ah oops, dont use syntax that prod doesn't support
right, dev supports `?.` syntax, but prod builds don't. I keep forgetting that!
This commit is contained in:
parent
2a30e8a6e5
commit
57c0981472
1 changed files with 4 additions and 2 deletions
|
@ -151,7 +151,8 @@ const resolvers = {
|
||||||
const speciesIdsByColorIdAndItemId = await itemsThatNeedModelsLoader.load(
|
const speciesIdsByColorIdAndItemId = await itemsThatNeedModelsLoader.load(
|
||||||
"all"
|
"all"
|
||||||
);
|
);
|
||||||
const row = speciesIdsByColorIdAndItemId.get(colorId)?.get(id);
|
const speciesIdsByItemId = speciesIdsByColorIdAndItemId.get(colorId);
|
||||||
|
const row = speciesIdsByItemId && speciesIdsByItemId.get(id);
|
||||||
if (!row) {
|
if (!row) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -232,7 +233,8 @@ const resolvers = {
|
||||||
const speciesIdsByColorIdAndItemId = await itemsThatNeedModelsLoader.load(
|
const speciesIdsByColorIdAndItemId = await itemsThatNeedModelsLoader.load(
|
||||||
"all"
|
"all"
|
||||||
);
|
);
|
||||||
const itemIds = speciesIdsByColorIdAndItemId.get(colorId)?.keys() || [];
|
const speciesIdsByItemIds = speciesIdsByColorIdAndItemId.get(colorId);
|
||||||
|
const itemIds = (speciesIdsByItemIds && speciesIdsByItemIds.keys()) || [];
|
||||||
return Array.from(itemIds, (id) => ({ id }));
|
return Array.from(itemIds, (id) => ({ id }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue