From 9078d2d25ad315346844125fb86b76e6571941d6 Mon Sep 17 00:00:00 2001 From: Julius Tens Date: Sat, 8 Jun 2019 12:54:59 +0200 Subject: [PATCH] fix reachable for walking legs --- parse/journey-leg.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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