parseJourneyLeg: null as fallback direction 🐛

This commit is contained in:
Jannis R 2018-05-13 22:52:33 +02:00
parent 2623fc44c6
commit c435e25390
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -48,7 +48,7 @@ const createParseJourneyLeg = (profile, stations, lines, remarks, polylines) =>
// todo: pull `public` value from `profile.products`
res.id = pt.jny.jid
res.line = lines[parseInt(pt.jny.prodX)] || null
res.direction = profile.parseStationName(pt.jny.dirTxt)
res.direction = profile.parseStationName(pt.jny.dirTxt) || null
if (pt.dep.dPlatfS) res.departurePlatform = pt.dep.dPlatfS
if (pt.arr.aPlatfS) res.arrivalPlatform = pt.arr.aPlatfS