mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
bugfixes: fix undefined variables 🐛
This commit is contained in:
parent
db94a62649
commit
bc30309056
2 changed files with 3 additions and 6 deletions
|
@ -49,11 +49,8 @@ const fixMovement = ({parsed}, m) => {
|
|||
// filter out POIs
|
||||
// todo: make use of them, as some of them specify fare zones
|
||||
parsed.nextStopovers = parsed.nextStopovers.filter(st => {
|
||||
const s = st.stop || {}
|
||||
if (s.station) {
|
||||
s = s.station
|
||||
if (s.station.type === 'stop' || s.station.type === 'station') return true
|
||||
}
|
||||
let s = st.stop || {}
|
||||
if (s.station) s = s.station
|
||||
return s.type === 'stop' || s.type === 'station'
|
||||
})
|
||||
parsed.frames = parsed.frames.filter((f) => {
|
||||
|
|
|
@ -27,7 +27,7 @@ const parseLocation = (ctx, l) => {
|
|||
const stop = {
|
||||
type: l.isMainMast ? 'station' : 'stop',
|
||||
id: res.id,
|
||||
name: l.name || id.O ? profile.parseStationName(ctx, l.name || id.O) : null,
|
||||
name: l.name || lid.O ? profile.parseStationName(ctx, l.name || lid.O) : null,
|
||||
location: 'number' === typeof res.latitude ? res : null // todo: remove `.id`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue