mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-16 05:34:21 +02:00
Fix loading of carts, only add items for which lookup succeeds.
This commit is contained in:
parent
bb11db1520
commit
f5998383f5
|
@ -55,8 +55,7 @@ class Carts extends Model {
|
|||
const items = [];
|
||||
for (const cartItem of cart.items) {
|
||||
const item = itemsLookup[cartItem.store + cartItem.id];
|
||||
if (!item) items.push(cartItem);
|
||||
else items.push(item);
|
||||
if (item) items.push(item);
|
||||
}
|
||||
cart.items = items;
|
||||
}
|
||||
|
|
|
@ -399,13 +399,13 @@
|
|||
"code": "34"
|
||||
},
|
||||
{
|
||||
"id": "joghurt-topfen",
|
||||
"url": "https://www.roksh.at/hofer/angebot/joghurt-topfen",
|
||||
"id": "milch-sahne-butter",
|
||||
"url": "https://www.roksh.at/hofer/angebot/milch-sahne-butter",
|
||||
"code": "34"
|
||||
},
|
||||
{
|
||||
"id": "milch-sahne-butter",
|
||||
"url": "https://www.roksh.at/hofer/angebot/milch-sahne-butter",
|
||||
"id": "joghurt-topfen",
|
||||
"url": "https://www.roksh.at/hofer/angebot/joghurt-topfen",
|
||||
"code": "34"
|
||||
},
|
||||
{
|
||||
|
@ -484,13 +484,13 @@
|
|||
"code": "32"
|
||||
},
|
||||
{
|
||||
"id": "rind",
|
||||
"url": "https://www.roksh.at/hofer/angebot/rind",
|
||||
"id": "faschiertes",
|
||||
"url": "https://www.roksh.at/hofer/angebot/faschiertes",
|
||||
"code": "32"
|
||||
},
|
||||
{
|
||||
"id": "faschiertes",
|
||||
"url": "https://www.roksh.at/hofer/angebot/faschiertes",
|
||||
"id": "rind",
|
||||
"url": "https://www.roksh.at/hofer/angebot/rind",
|
||||
"code": "32"
|
||||
},
|
||||
{
|
||||
|
@ -503,19 +503,14 @@
|
|||
"url": "https://www.roksh.at/hofer/angebot/honig-nussaufstriche",
|
||||
"code": "56"
|
||||
},
|
||||
{
|
||||
"id": "obstkonserven",
|
||||
"url": "https://www.roksh.at/hofer/angebot/obstkonserven",
|
||||
"code": "57"
|
||||
},
|
||||
{
|
||||
"id": "gemusekonserven",
|
||||
"url": "https://www.roksh.at/hofer/angebot/gemusekonserven",
|
||||
"code": "57"
|
||||
},
|
||||
{
|
||||
"id": "fleisch-fischkonserven",
|
||||
"url": "https://www.roksh.at/hofer/angebot/fleisch-fischkonserven",
|
||||
"id": "obstkonserven",
|
||||
"url": "https://www.roksh.at/hofer/angebot/obstkonserven",
|
||||
"code": "57"
|
||||
},
|
||||
{
|
||||
|
@ -523,6 +518,11 @@
|
|||
"url": "https://www.roksh.at/hofer/angebot/sauerkonserven",
|
||||
"code": "57"
|
||||
},
|
||||
{
|
||||
"id": "fleisch-fischkonserven",
|
||||
"url": "https://www.roksh.at/hofer/angebot/fleisch-fischkonserven",
|
||||
"code": "57"
|
||||
},
|
||||
{
|
||||
"id": "nusse",
|
||||
"url": "https://www.roksh.at/hofer/angebot/nusse",
|
||||
|
@ -629,13 +629,13 @@
|
|||
"code": "20"
|
||||
},
|
||||
{
|
||||
"id": "smoothies",
|
||||
"url": "https://www.roksh.at/hofer/angebot/smoothies",
|
||||
"id": "sirupe",
|
||||
"url": "https://www.roksh.at/hofer/angebot/sirupe",
|
||||
"code": "20"
|
||||
},
|
||||
{
|
||||
"id": "sirupe",
|
||||
"url": "https://www.roksh.at/hofer/angebot/sirupe",
|
||||
"id": "smoothies",
|
||||
"url": "https://www.roksh.at/hofer/angebot/smoothies",
|
||||
"code": "20"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user