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",