From 78487d9163751280dc388bc793900a7fcc1fa120 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 18 Mar 2020 21:44:13 +0100 Subject: [PATCH] journeys: default earlierRef & laterRef to null :bug: `JSON.stringify` exludes entries with `undefined`. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3e6965d9..6d5bc96a 100644 --- a/index.js +++ b/index.js @@ -175,7 +175,7 @@ const createClient = (profile, userAgent, opt = {}) => { // until we have enough. // todo: revert this change, see https://github.com/public-transport/hafas-client/issues/76#issuecomment-424448449 const journeys = [] - let earlierRef, laterRef + let earlierRef = null, laterRef = null const more = (when, journeysRef) => { const query = { outDate: profile.formatDate(profile, when),