From ee63b4815f769bf97d23af67c61350bc9a2304a0 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 1 Dec 2017 23:00:44 +0100 Subject: [PATCH] Handle all-day current events --- events/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/calendar.js b/events/calendar.js index 9cc08af..dd27204 100644 --- a/events/calendar.js +++ b/events/calendar.js @@ -6,7 +6,7 @@ function getEvents(number) { const allEvents = window.c_base_events.concat(window.c_base_regulars); const current = allEvents.filter((event) => { const start = new Date(event.start); - if (!event.end) { + if ((!event.data || event.allDay) && start.toDateString() !== now.toDateString()) { return false; } const end = new Date(event.end);