Fix CatalogLayoutPetView

This commit is contained in:
Bill 2022-03-30 12:48:08 -04:00
parent 0773bcf044
commit a3fc343418

View File

@ -26,7 +26,7 @@ export const CatalogLayoutPetView: FC<CatalogLayoutProps> = props =>
const [ approvalPending, setApprovalPending ] = useState(true);
const [ approvalResult, setApprovalResult ] = useState(-1);
const { currentOffer = null, setCurrentOffer = null, setPurchaseOptions = null, catalogOptions = null, roomPreviewer = null } = useCatalogContext();
const { petPalettes = [] } = catalogOptions;
const { petPalettes = null } = catalogOptions;
const getColor = useMemo(() =>
{
@ -138,6 +138,8 @@ export const CatalogLayoutPetView: FC<CatalogLayoutProps> = props =>
if(!productData) return;
if(petPalettes)
{
for(const paletteData of petPalettes)
{
if(paletteData.breed !== productData.type) continue;
@ -159,6 +161,7 @@ export const CatalogLayoutPetView: FC<CatalogLayoutProps> = props =>
return;
}
}
BatchUpdates(() =>
{