From 5f32d800229ee905621a52300a0b764755ca054b Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 15 Mar 2021 08:29:26 -0700 Subject: [PATCH] Oops, fix backend syntax error Right, I keep forgetting that my local env isn't picky about this, but prod is --- src/server/types/PetAppearance.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/types/PetAppearance.js b/src/server/types/PetAppearance.js index 7e23704..0ab3407 100644 --- a/src/server/types/PetAppearance.js +++ b/src/server/types/PetAppearance.js @@ -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;