From aa480e01a2842df7b0686d48a98acf4c2cafba2b Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 16 May 2018 00:30:27 +0200 Subject: [PATCH] radar: fix polylines parsing :bug: --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b08a408b..7ed498ee 100644 --- a/index.js +++ b/index.js @@ -341,7 +341,7 @@ const createClient = (profile, request = _request) => { if (!Array.isArray(d.jnyL)) return [] let polylines = [] - if (opt.polylines && Array.isArray(d.common.polyL)) { + if (opt.polylines && d.common && Array.isArray(d.common.polyL)) { polylines = d.common.polyL } const parse = profile.parseMovement(profile, d.locations, d.lines, d.remarks, polylines) diff --git a/package.json b/package.json index bb03ae66..18ce6e92 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hafas-client", "description": "JavaScript client for HAFAS public transport APIs.", - "version": "2.7.0", + "version": "2.7.1", "main": "index.js", "files": [ "index.js",