mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
arrivals/departures: fix remarks parsing 🐛
This commit is contained in:
parent
58f183506e
commit
17aeacf594
1 changed files with 4 additions and 3 deletions
|
@ -19,9 +19,10 @@ const createParseArrOrDep = (profile, opt, data, prefix) => {
|
||||||
when: when.toISO(),
|
when: when.toISO(),
|
||||||
direction: profile.parseStationName(d.dirTxt),
|
direction: profile.parseStationName(d.dirTxt),
|
||||||
line: lines[parseInt(d.prodX)] || null,
|
line: lines[parseInt(d.prodX)] || null,
|
||||||
remarks: (d.remL
|
remarks: ([]
|
||||||
? d.remL.map(ref => findRemark(hints, warnings, ref))
|
.concat(d.remL || [], d.msgL || [])
|
||||||
: []
|
.map(ref => findRemark(hints, warnings, ref))
|
||||||
|
.filter(rem => !!rem) // filter unparsable
|
||||||
),
|
),
|
||||||
// todo: res.trip from rawLine.prodCtx.num?
|
// todo: res.trip from rawLine.prodCtx.num?
|
||||||
trip: +d.jid.split('|')[1] // todo: this seems brittle
|
trip: +d.jid.split('|')[1] // todo: this seems brittle
|
||||||
|
|
Loading…
Add table
Reference in a new issue