Oops, add some more wiring for pet state ID for saved outfits

There's an infinite loop happening in prod that I can't reproduce on
dev, but this missing piece feels like it could be related.
This commit is contained in:
Emi Matchu 2024-02-08 10:15:31 -08:00
parent 66f20747a9
commit 3ab6d1e3ae
3 changed files with 3 additions and 1 deletions

View file

@ -69,6 +69,7 @@ function useOutfitSaving(outfitState, dispatchToOutfit) {
speciesId: outfitState.speciesId,
colorId: outfitState.colorId,
pose: outfitState.pose,
appearanceId: outfitState.appearanceId,
altStyleId: outfitState.altStyleId,
wornItemIds: [...outfitState.wornItemIds],
closetedItemIds: [...outfitState.closetedItemIds],

View file

@ -447,6 +447,7 @@ function getOutfitStateFromOutfitData(outfit) {
speciesId: outfit.speciesId,
colorId: outfit.colorId,
pose: outfit.pose,
appearanceId: outfit.appearanceId,
altStyleId: outfit.altStyleId,
wornItemIds: new Set(outfit.wornItemIds),
closetedItemIds: new Set(outfit.closetedItemIds),

View file

@ -129,7 +129,7 @@ function normalizeOutfit(outfit) {
speciesId: String(outfit.species_id),
colorId: String(outfit.color_id),
pose: outfit.pose,
appearanceId: outfit.pet_state_id,
appearanceId: String(outfit.pet_state_id),
altStyleId: outfit.alt_style_id ? String(outfit.alt_style_id) : null,
wornItemIds: (outfit.item_ids?.worn || []).map((id) => String(id)),
closetedItemIds: (outfit.item_ids?.closeted || []).map((id) =>