mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
parseArrOrDep, parseLocation: bugfixes 🐛
This commit is contained in:
parent
9ce72930b1
commit
1cc453b778
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue