diff --git a/parse/journey-leg.js b/parse/journey-leg.js index 69952820..12e2b31f 100644 --- a/parse/journey-leg.js +++ b/parse/journey-leg.js @@ -55,8 +55,11 @@ const createParseJourneyLeg = (profile, opt, data) => { origin: clone(locations[parseInt(pt.dep.locX)]) || null, destination: clone(locations[parseInt(pt.arr.locX)]), departure: dep, - arrival: arr, - reachable: !!pt.jny.isRchbl + arrival: arr + } + + if (pt.jny) { + res.reachable = !!pt.jny.isRchbl } // todo: DRY with parseDeparture