Fix crash when editing saved outfit

Oops, something I didn't test in the recent refactor! Right, these need to be Sets.
This commit is contained in:
Emi Matchu 2021-04-16 23:49:10 -07:00
parent 71215fe599
commit 9f2629ae61

View file

@ -383,8 +383,10 @@ function getOutfitStateFromOutfitData(outfit) {
colorId: outfit.petAppearance?.color?.id, colorId: outfit.petAppearance?.color?.id,
pose: outfit.petAppearance?.pose, pose: outfit.petAppearance?.pose,
// Whereas the items are more convenient to just leave as empty lists! // Whereas the items are more convenient to just leave as empty lists!
wornItemIds: (outfit.wornItems || []).map((item) => item.id), wornItemIds: new Set((outfit.wornItems || []).map((item) => item.id)),
closetedItemIds: (outfit.closetedItems || []).map((item) => item.id), closetedItemIds: new Set(
(outfit.closetedItems || []).map((item) => item.id)
),
}; };
} }