Oops, fix backend syntax error

Right, I keep forgetting that my local env isn't picky about this, but prod is
This commit is contained in:
Emi Matchu 2021-03-15 08:29:26 -07:00
parent 1dce12e792
commit 5f32d80022

View file

@ -160,7 +160,8 @@ const resolvers = {
const petState = await canonicalPetStateForBodyLoader.load({
bodyId: petType.bodyId,
preferredColorId,
fallbackColorId: FALLBACK_COLOR_IDS[species?.id] || "8",
fallbackColorId:
(species ? FALLBACK_COLOR_IDS[species.id] : null) || "8",
});
if (!petState) {
return null;
@ -213,7 +214,8 @@ const resolvers = {
const petState = await canonicalPetStateForBodyLoader.load({
bodyId: id,
preferredColorId,
fallbackColorId: FALLBACK_COLOR_IDS[species?.id] || "8",
fallbackColorId:
(species ? FALLBACK_COLOR_IDS[species.id] : null) || "8",
});
if (!petState) {
return null;