From bcbc366497ef62046caf98cefefc1be4565279d5 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 6 Dec 2018 11:35:48 +0100 Subject: [PATCH] =?UTF-8?q?=C3=96BB=20radar():=20don't=20filter=20out=20st?= =?UTF-8?q?ops=20:bug:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- p/oebb/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/p/oebb/index.js b/p/oebb/index.js index 4e3e7f87..743388f0 100644 --- a/p/oebb/index.js +++ b/p/oebb/index.js @@ -50,7 +50,13 @@ const createParseMovement = (profile, opt, data) => { const res = _parseMovement(m) // filter out POIs // todo: make use of them, as some of them specify fare zones - res.nextStops = res.nextStops.filter(s => s.type === 'station') + res.nextStops = res.nextStops.filter(s => { + if (s.station) { + s = s.station + if (s.type === 'stop' || s.type === 'station') + } + return s.type === 'stop' || s.type === 'station' + }) res.frames = res.frames.filter((f) => { return f.origin.type !== 'location' && f.destination.type !== 'location' })