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(
|
||||
"all"
|
||||
);
|
||||
const row = speciesIdsByColorIdAndItemId.get(colorId)?.get(id);
|
||||
const speciesIdsByItemId = speciesIdsByColorIdAndItemId.get(colorId);
|
||||
const row = speciesIdsByItemId && speciesIdsByItemId.get(id);
|
||||
if (!row) {
|
||||
return [];
|
||||
}
|
||||
|
@ -232,7 +233,8 @@ const resolvers = {
|
|||
const speciesIdsByColorIdAndItemId = await itemsThatNeedModelsLoader.load(
|
||||
"all"
|
||||
);
|
||||
const itemIds = speciesIdsByColorIdAndItemId.get(colorId)?.keys() || [];
|
||||
const speciesIdsByItemIds = speciesIdsByColorIdAndItemId.get(colorId);
|
||||
const itemIds = (speciesIdsByItemIds && speciesIdsByItemIds.keys()) || [];
|
||||
return Array.from(itemIds, (id) => ({ id }));
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue