mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
fix product parsing 🐛
This commit is contained in:
parent
e9d95447c9
commit
5df274c952
1 changed files with 2 additions and 1 deletions
3
parse.js
3
parse.js
|
@ -38,7 +38,8 @@ const location = (l) => {
|
|||
// todo: what is p.cls?
|
||||
// todo: what is p.oprX?
|
||||
const product = (p) => {
|
||||
if (!p.prodCtx) return null
|
||||
if (p.prodCtx) p = p.prodCtx
|
||||
if (!p) return null
|
||||
return {
|
||||
name: p.name, nr: +p.number, class: p.cls,
|
||||
productCode: +p.prodCtx.catCode, productName: p.prodCtx.catOutS
|
||||
|
|
Loading…
Add table
Reference in a new issue