diff --git a/p/oebb/index.js b/p/oebb/index.js index c001564b..0d0e5ec5 100644 --- a/p/oebb/index.js +++ b/p/oebb/index.js @@ -50,7 +50,8 @@ const createParseMovement = (profile, opt, data) => { const res = _parseMovement(m) // filter out POIs // todo: make use of them, as some of them specify fare zones - res.nextStops = res.nextStops.filter(s => { + res.nextStops = res.nextStops.filter(st => { + const s = st.stop || {} if (s.station) { s = s.station if (s.station.type === 'stop' || s.station.type === 'station') return true diff --git a/test/oebb.js b/test/oebb.js index d2240476..e651958e 100644 --- a/test/oebb.js +++ b/test/oebb.js @@ -373,8 +373,7 @@ test('radar Salzburg', co(function* (t) { south: 47.773278, east: 13.07562 }, { - duration: 5 * 60, - // when + duration: 5 * 60, when }) // todo: find a way to always get frames from the API