diff --git a/dev-todos.txt b/dev-todos.txt index 68cfe5e..1c2e865 100644 --- a/dev-todos.txt +++ b/dev-todos.txt @@ -2,3 +2,4 @@ * Use react-virtualized instead of our own scroller, but we need total count known, and we need another solution for the CSS transitions in the outfit case * Restore good download behavior: use crossOrigin for everything, and remove cache-buster in the URL we use for canvas * Undo the local linking we did for @chakra-ui/core, react, and react-dom on Matchu's machine 😅 +* Present invalidated items somewhere on the screen, instead of them just vanishing? :/ diff --git a/src/server/index.js b/src/server/index.js index 1981b7b..e9f56a9 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -96,6 +96,10 @@ const resolvers = { bodyId: petType.bodyId, }); + if (swfAssets.length === 0) { + return null; + } + const restrictedZones = []; for (const [i, bit] of Array.from(item.zonesRestrict).entries()) { if (bit === "1") { diff --git a/src/useOutfitState.js b/src/useOutfitState.js index 21aa504..d15242f 100644 --- a/src/useOutfitState.js +++ b/src/useOutfitState.js @@ -210,6 +210,10 @@ function getZonesAndItems(itemsById, wornItemIds, closetedItemIds) { const allItems = [...wornItems, ...closetedItems]; const itemsByZoneLabel = new Map(); for (const item of allItems) { + if (!item.appearanceOn) { + continue; + } + for (const layer of item.appearanceOn.layers) { const zoneLabel = layer.zone.label;