From 1eb00ba6ca2d9895907faec91bdc547e7b451fca Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 9 Feb 2021 22:27:22 -0800 Subject: [PATCH] Fix crash when choosing invalid appearance Oops, I messed up in my `useOutfitPreview` refactor just now! Fixing fixing! --- src/app/components/OutfitPreview.js | 31 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/app/components/OutfitPreview.js b/src/app/components/OutfitPreview.js index 1f1c68e..d13381f 100644 --- a/src/app/components/OutfitPreview.js +++ b/src/app/components/OutfitPreview.js @@ -77,8 +77,9 @@ export function useOutfitPreview({ } }, [layersHaveAnimations, onChangeHasAnimations]); + let preview; if (error || error2) { - return ( + preview = ( @@ -87,22 +88,22 @@ export function useOutfitPreview({ ); + } else { + preview = ( + + ); } - const preview = ( - - ); - return { appearance, preview }; }