journeys: default earlierRef & laterRef to null 🐛

`JSON.stringify` exludes entries with `undefined`.
This commit is contained in:
Jannis R 2020-03-18 21:44:13 +01:00
parent 916ac3067d
commit 78487d9163
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -175,7 +175,7 @@ const createClient = (profile, userAgent, opt = {}) => {
// until we have enough. // until we have enough.
// todo: revert this change, see https://github.com/public-transport/hafas-client/issues/76#issuecomment-424448449 // todo: revert this change, see https://github.com/public-transport/hafas-client/issues/76#issuecomment-424448449
const journeys = [] const journeys = []
let earlierRef, laterRef let earlierRef = null, laterRef = null
const more = (when, journeysRef) => { const more = (when, journeysRef) => {
const query = { const query = {
outDate: profile.formatDate(profile, when), outDate: profile.formatDate(profile, when),