diff --git a/index.js b/index.js index 8aaacc77..351eb012 100644 --- a/index.js +++ b/index.js @@ -231,6 +231,7 @@ const createClient = (profile, userAgent, request = _request) => { }) .then((d) => { if (!Array.isArray(d.outConL)) return [] + // todo: outConGrpL const parse = profile.parseJourney(profile, opt, d) diff --git a/parse/common.js b/parse/common.js index 5be75405..35555edb 100644 --- a/parse/common.js +++ b/parse/common.js @@ -15,6 +15,7 @@ const parseCommonData = (profile, opt, raw) => { const res = Object.assign({}, raw) const c = raw.common || {} + res.operators = [] if (Array.isArray(c.opL)) { res.operators = c.opL.map(op => profile.parseOperator(profile, op)) } @@ -22,11 +23,13 @@ const parseCommonData = (profile, opt, raw) => { res.icons = [] if (Array.isArray(c.icoL)) res.icons = c.icoL.map(parseIcon) + res.lines = [] if (Array.isArray(c.prodL)) { const parse = profile.parseLine(profile, opt, res) res.lines = c.prodL.map(parse) } + res.locations = [] if (Array.isArray(c.locL)) { const parse = loc => profile.parseLocation(profile, opt, res, loc) res.locations = c.locL.map(parse) diff --git a/parse/journey-leg.js b/parse/journey-leg.js index aafce36e..1097947e 100644 --- a/parse/journey-leg.js +++ b/parse/journey-leg.js @@ -118,7 +118,6 @@ const createParseJourneyLeg = (profile, opt, data) => { const stopL = pt.jny.stopL res.stopovers = stopL.map(parse) - // todo: is there a `pt.jny.remL`? if (opt.remarks && Array.isArray(pt.jny.msgL)) { for (let i = 0; i < stopL.length; i++) { Object.defineProperty(res.stopovers[i], locX, { diff --git a/parse/line.js b/parse/line.js index a14784b2..6de3f835 100644 --- a/parse/line.js +++ b/parse/line.js @@ -10,6 +10,7 @@ const createParseLine = (profile, opt, {operators}) => { } } + // todo: p.himIdL const parseLine = (p) => { if (!p) return null // todo: handle this upstream const name = p.line || p.addName || p.name || null // wtf diff --git a/parse/warning.js b/parse/warning.js index e87a72c4..70d1b07d 100644 --- a/parse/warning.js +++ b/parse/warning.js @@ -29,7 +29,7 @@ const parseMsgEvent = (profile, data) => (e) => { const parseWarning = (profile, w, data) => { const icons = data.icoL || [] - // todo: act, pub, lead, tckr, fLocX, tLocX, prod, comp, + // todo: act, pub, lead, tckr, prod, comp, // todo: cat (1, 2), pubChL, rRefL, impactL // pubChL: // [ { name: 'timetable',