From a1ffad30717a94f77b958d4bdce3d164e9098ff7 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 10 Dec 2018 20:42:37 +0100 Subject: [PATCH] parseLine: remove line.class & line.productCode :boom: --- parse/line.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/parse/line.js b/parse/line.js index bb6e313f..32871e5f 100644 --- a/parse/line.js +++ b/parse/line.js @@ -26,15 +26,11 @@ const createParseLine = (profile, opt, {operators}) => { public: true } // todo: what is p.number? + // todo: what is p.prodCtx.catCode? - if (p.cls) res.class = p.cls - if (p.prodCtx && p.prodCtx.catCode !== undefined) { - res.productCode = +p.prodCtx.catCode - } - - if ('class' in res) { - // todo: what if `res.class` is the sum of two bitmasks? - const product = byBitmask[parseInt(res.class)] + if ('cls' in p) { + // todo: what if `p.cls` is the sum of two bitmasks? + const product = byBitmask[parseInt(p.cls)] res.mode = product && product.mode || null res.product = product && product.id || null }