From faf6a924ba89ce507928e403bb8459912ce4559e Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 1 Dec 2017 20:33:43 +0100 Subject: [PATCH] Fix current event listing --- events/calendar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/events/calendar.js b/events/calendar.js index aa35b72..9cc08af 100644 --- a/events/calendar.js +++ b/events/calendar.js @@ -6,7 +6,10 @@ 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); - const end = new Date(event.start); + if (!event.end) { + return false; + } + const end = new Date(event.end); if (start > now) { return false; }