Skip to content

Commit cb4da60

Browse files
authored
Update calendar.js
1 parent 4b4a595 commit cb4da60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

defaultmodules/calendar/calendar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,9 @@ Module.register("calendar", {
588588
if (eventsByDate[dateStr] && eventsByDate[dateStr].length > 0) {
589589
// If there are any events today then get all those events and select the currently active events and the events that are starting later in the day.
590590
newEvents.push(...eventsByDate[dateStr].filter((ev) => this.timestampToMoment(ev.endDate).isAfter(moment())));
591-
// Since we found a day with events, increase the daysCollected by 1
592-
daysCollected++;
593591
}
592+
// Increment the daysCollected by one to ensure the while loop does not get stuck.
593+
daysCollected++;
594594
// Search for the next day
595595
currentDate.add(1, "day");
596596
}

0 commit comments

Comments
 (0)