From 8e4138b493a87b872d8662c60c6b5534e0ba9496 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Wed, 26 Dec 2018 12:24:09 +0100 Subject: [PATCH] Actually return the talks --- 35c3-events/calendar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/35c3-events/calendar.js b/35c3-events/calendar.js index 49f3b5e..da83a78 100644 --- a/35c3-events/calendar.js +++ b/35c3-events/calendar.js @@ -35,6 +35,9 @@ function getEvents(number) { } Object.keys(day.rooms).forEach((room) => { day.rooms[room].forEach((slot) => { + if (!slot.date) { + return; + } const start = new Date(slot.date); const [durationH, durationM] = slot.duration.split(':').map(val => parseInt(val, 10)); const end = new Date(slot.date); @@ -54,6 +57,7 @@ function getEvents(number) { }); }); }); + return talks; }) .then(talks => baseevents.concat(talks))) .then(talks => fetch('https://launchlibrary.net/1.3/launch/next/2')