From 4c86b625c73b1f4cacf48dfedbcb4b2170b144dd Mon Sep 17 00:00:00 2001 From: Jannis R Date: Tue, 26 Jun 2018 11:47:43 +0200 Subject: [PATCH] parse fn signatures: bugfixes :bug: --- parse/departure.js | 4 ++-- parse/movement.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parse/departure.js b/parse/departure.js index 89682f70..0a21f893 100644 --- a/parse/departure.js +++ b/parse/departure.js @@ -6,14 +6,14 @@ // todo: d.stbStop.dProgType // todo: d.freq, d.freq.jnyL, see https://github.com/public-transport/hafas-client/blob/9203ed1481f08baacca41ac5e3c19bf022f01b0b/parse.js#L115 -const createParseDeparture = (profile, opt, {stations, lines, remarks}) => { +const createParseDeparture = (profile, opt, {locations, lines, remarks}) => { const findRemark = rm => remarks[parseInt(rm.remX)] || null const parseDeparture = (d) => { const when = profile.parseDateTime(profile, d.date, d.stbStop.dTimeR || d.stbStop.dTimeS) const res = { journeyId: d.jid, - station: stations[parseInt(d.stbStop.locX)] || null, + station: locations[parseInt(d.stbStop.locX)] || null, when: when.toISO(), direction: profile.parseStationName(d.dirTxt), line: lines[parseInt(d.prodX)] || null, diff --git a/parse/movement.js b/parse/movement.js index 5f942f86..8cf6f3bd 100644 --- a/parse/movement.js +++ b/parse/movement.js @@ -1,6 +1,6 @@ 'use strict' -const createParseMovement = (profile, data) => { +const createParseMovement = (profile, opt, data) => { const {locations, lines, remarks, polylines} = data // todo: what is m.dirGeo? maybe the speed?