mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
allow multiple bitmask positions for one product
This commit is contained in:
parent
66d869a3eb
commit
54865e67e6
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ const createParseBitmask = (bitmasks) => {
|
|||
const products = {}
|
||||
let i = 1
|
||||
do {
|
||||
products[bitmasks[i].product] = !!(bitmask & i)
|
||||
products[bitmasks[i].product] = products[bitmasks[i].product] || !!(bitmask & i)
|
||||
i *= 2
|
||||
} while (bitmasks[i] && bitmasks[i].product)
|
||||
return products
|
||||
|
|
Loading…
Add table
Reference in a new issue