diff --git a/index.js b/index.js index cc81854f..163dd31c 100644 --- a/index.js +++ b/index.js @@ -234,6 +234,7 @@ const createClient = (profile, request = _request) => { else if ('string' === typeof station) station = profile.formatStation(station) else throw new Error('station must be an object or a string.') + const opt = {} return request(profile, opt, { meth: 'LocDetails', req: { @@ -287,7 +288,7 @@ const createClient = (profile, request = _request) => { .then((d) => { if (!Array.isArray(d.locL)) return [] const parse = profile.parseNearby - return d.locL.map(loc => parse(profile, opt, loc)) + return d.locL.map(loc => parse(profile, opt, d, loc)) }) } diff --git a/p/nahsh/index.js b/p/nahsh/index.js index ca10f853..cab9da69 100644 --- a/p/nahsh/index.js +++ b/p/nahsh/index.js @@ -78,8 +78,8 @@ const createParseJourney = (profile, opt, data) => { return parseJourneyWithTickets } -const createParseMovement = (profile, data) => { - const _parseMovement = _createParseMovement(profile, data) +const createParseMovement = (profile, opt, data) => { + const _parseMovement = _createParseMovement(profile, opt, data) const parseMovement = (m) => { const res = _parseMovement(m) // filter out empty nextStops entries