Skip to content

Commit

Permalink
Merge pull request #100 from cloud-atlas-ai:fix-duplicate-event-on-fi…
Browse files Browse the repository at this point in the history
…rst-recurrence

Duplicate listing on the first recurrence of an event
  • Loading branch information
muness authored Jan 11, 2024
2 parents fe75f04 + 318b7b0 commit d1230d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/icalUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export function filterMatchingEvents(icsArray: any[], dayToMatch: string) {
if (moment(date).isSame(dayToMatch, "day")) {
hasRecurrenceOverride = true;
}

const recurrence = event.recurrences[date];
if (moment(recurrence.start).isSame(dayToMatch, "day")) {
matchingEvents.push(recurrence);
}
const recurrence = event.recurrences[date];
if (moment(recurrence.start).isSame(dayToMatch, "day")) {
matchingEvents.push(recurrence);
hasRecurrenceOverride = true;
}
}
}
if (typeof event.rrule !== 'undefined' && !hasRecurrenceOverride) {
Expand Down

0 comments on commit d1230d1

Please sign in to comment.