Skip to content

Commit 8dd4ef5

Browse files
committed
parseLine: remove line.class & line.productCode 💥
1 parent 4ed2436 commit 8dd4ef5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

parse/line.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,11 @@ const createParseLine = (profile, opt, {operators}) => {
2626
public: true
2727
}
2828
// todo: what is p.number?
29+
// todo: what is p.prodCtx.catCode?
2930

30-
if (p.cls) res.class = p.cls
31-
if (p.prodCtx && p.prodCtx.catCode !== undefined) {
32-
res.productCode = +p.prodCtx.catCode
33-
}
34-
35-
if ('class' in res) {
36-
// todo: what if `res.class` is the sum of two bitmasks?
37-
const product = byBitmask[parseInt(res.class)]
31+
if ('cls' in p) {
32+
// todo: what if `p.cls` is the sum of two bitmasks?
33+
const product = byBitmask[parseInt(p.cls)]
3834
res.mode = product && product.mode || null
3935
res.product = product && product.id || null
4036
}

0 commit comments

Comments
 (0)