Skip to content

Commit

Permalink
fix: return outfit wearables in lowercases (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega authored Jun 17, 2024
1 parent 5d5b822 commit 142c8f3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/logic/outfits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,21 @@ export async function getOutfits(
const extraOutfitsWithOwnedWearables = fullyOwnedOutfits.filter((outfit) => outfit.slot > 4)
const extraOutfitsWithOwnedWearablesAndNames = extraOutfitsWithOwnedWearables.slice(0, names.length)

const outfitsWithWearablesInLowerCase = [
...normalOutfitsWithOwnedWearables,
...extraOutfitsWithOwnedWearablesAndNames
].map((outfit) => ({
...outfit,
outfit: {
...outfit.outfit,
wearables: outfit.outfit.wearables.map((wearable) => wearable.toLowerCase())
}
}))

return {
...outfitsEntity,
metadata: {
outfits: [...normalOutfitsWithOwnedWearables, ...extraOutfitsWithOwnedWearablesAndNames],
outfits: outfitsWithWearablesInLowerCase,
namesForExtraSlots: names.map((name) => name.name)
}
}
Expand Down

0 comments on commit 142c8f3

Please sign in to comment.