diff --git a/parse/arrival-or-departure.js b/parse/arrival-or-departure.js index a59ec6db..1c376e6e 100644 --- a/parse/arrival-or-departure.js +++ b/parse/arrival-or-departure.js @@ -59,7 +59,7 @@ const createParseArrOrDep = (profile, opt, data, prefix) => { .filter(rem => !!rem) // filter unparsable } - if (opt.stopovers && d.stopL) { + if (opt.stopovers && Array.isArray(d.stopL)) { const parse = profile.parseStopover(profile, opt, data, d.date) // Filter stations the train passes without stopping, as this doesn't comply with FPTF (yet). const stopovers = d.stopL.map(parse).filter(st => !st.passBy) diff --git a/parse/location.js b/parse/location.js index e82df7eb..22d1023f 100644 --- a/parse/location.js +++ b/parse/location.js @@ -25,7 +25,7 @@ const parseLocation = (profile, opt, {lines}, l) => { const stop = { type: l.isMainMast ? 'station' : 'stop', id: res.id, - name: l.name ? profile.parseStationName(l.name) : null, + name: l.name || id.O ? profile.parseStationName(l.name || id.O) : null, location: 'number' === typeof res.latitude ? res : null // todo: remove `.id` }