1
0
miroir de https://github.com/karl0ss/homepage.git synchronisé 2025-11-24 12:04:29 +00:00

Fix for events repeating on mothly basis and old events that are shown as occuring today (#2624)

Cette révision appartient à :
Denis Papec 2024-01-14 21:49:28 +00:00 révisé par GitHub
Parent 9984e7894f
révision 674d7f2e01
Signature inconnue de Gitea
ID de la clé GPG: 4AEE18F83AFDEB23

Voir le fichier

@ -55,8 +55,9 @@ export default function Integration({ config, params, setEvents, hideErrors }) {
} }
}; };
if (event?.recurrenceRule?.options) { const recurrenceOptions = event?.recurrenceRule?.origOptions;
const rule = new RRule(event.recurrenceRule.options); if (recurrenceOptions && Object.keys(recurrenceOptions).length !== 0) {
const rule = new RRule(recurrenceOptions);
const recurringEvents = rule.between(startDate.toJSDate(), endDate.toJSDate()); const recurringEvents = rule.between(startDate.toJSDate(), endDate.toJSDate());
recurringEvents.forEach((date, i) => eventToAdd(date, i, "recurring")); recurringEvents.forEach((date, i) => eventToAdd(date, i, "recurring"));