From 8a5e87b1167e01358885c7aff9513ed74fbf31dd Mon Sep 17 00:00:00 2001 From: Johan Alvinger Date: Tue, 24 Nov 2020 23:17:26 +0100 Subject: [PATCH] All events from the beginning of today were fetched but we only want the ones that are ongoing or upcoming. --- modules/default/calendar/calendarfetcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 0fb13ca5..f977a9ee 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -382,7 +382,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn } else { // All events from startOfToday are fetched but we only want the ones that haven't ended yet const now = moment(); - for (ne of newEvents) { + for (var ne of newEvents) { if (moment(ne.endDate, "x").isAfter(now)) events.push(ne); } }