ÖBB: fix radar() 🐛, fix radar() test 💚

This commit is contained in:
Jannis R 2018-12-07 16:11:09 +01:00
parent ae2007c9e2
commit e1f1d0d258
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,8 @@ const createParseMovement = (profile, opt, data) => {
const res = _parseMovement(m) const res = _parseMovement(m)
// filter out POIs // filter out POIs
// todo: make use of them, as some of them specify fare zones // 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) { if (s.station) {
s = s.station s = s.station
if (s.station.type === 'stop' || s.station.type === 'station') return true if (s.station.type === 'stop' || s.station.type === 'station') return true

View file

@ -373,8 +373,7 @@ test('radar Salzburg', co(function* (t) {
south: 47.773278, south: 47.773278,
east: 13.07562 east: 13.07562
}, { }, {
duration: 5 * 60, duration: 5 * 60, when
// when
}) })
// todo: find a way to always get frames from the API // todo: find a way to always get frames from the API