mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
ÖBB radar(): don't filter out stops 🐛
This commit is contained in:
parent
b809281d0e
commit
bcbc366497
1 changed files with 7 additions and 1 deletions
|
@ -50,7 +50,13 @@ 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 => s.type === 'station')
|
||||
res.nextStops = res.nextStops.filter(s => {
|
||||
if (s.station) {
|
||||
s = s.station
|
||||
if (s.type === 'stop' || s.type === 'station')
|
||||
}
|
||||
return s.type === 'stop' || s.type === 'station'
|
||||
})
|
||||
res.frames = res.frames.filter((f) => {
|
||||
return f.origin.type !== 'location' && f.destination.type !== 'location'
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue