aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-03-01 21:11:19 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-03-01 21:11:19 -0600
commit82a8610e1d5b41b2da3bd6c2e8cf70713992978c (patch)
tree5b98a1d8331669b3c1924c75414020e4935102aa /src/cleaners
parent36167af958d472b936d5c575662ef37cbd6f8448 (diff)
downloadskyblock-api-82a8610e1d5b41b2da3bd6c2e8cf70713992978c.tar.gz
skyblock-api-82a8610e1d5b41b2da3bd6c2e8cf70713992978c.tar.bz2
skyblock-api-82a8610e1d5b41b2da3bd6c2e8cf70713992978c.zip
Fix error on some profiles with inventory API
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/skyblock/inventory.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts
index ed9b5ed..76acf60 100644
--- a/src/cleaners/skyblock/inventory.ts
+++ b/src/cleaners/skyblock/inventory.ts
@@ -91,14 +91,15 @@ export async function cleanInventories(data: any): Promise<Inventories> {
const hypixelInventoryName = INVENTORIES[cleanInventoryName]
const encodedInventoryContents = data[hypixelInventoryName]?.data
let inventoryContents: Inventory
- if (encodedInventoryContents)
+ if (encodedInventoryContents) {
inventoryContents = await cleanInventory(encodedInventoryContents)
- if (cleanInventoryName === 'armor')
- // the armor is sent from boots to head, the opposite makes more sense
- inventoryContents.reverse()
+ if (cleanInventoryName === 'armor')
+ // the armor is sent from boots to head, the opposite makes more sense
+ inventoryContents.reverse()
- cleanInventories[cleanInventoryName] = inventoryContents
+ cleanInventories[cleanInventoryName] = inventoryContents
+ }
}
return cleanInventories
} \ No newline at end of file