aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-10 19:56:25 -0500
committermat <github@matdoes.dev>2022-04-10 19:56:25 -0500
commitfffdfd3a9690fa1a491e8a45472162e770462ea3 (patch)
tree00d1831a0fc03b86b51801db4023fd2d478929b2
parent69f88bee6afd00e0fd40a12398bd06ddbfb213e6 (diff)
downloadskyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.tar.gz
skyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.tar.bz2
skyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.zip
Fix error when player has a weird pet rarity
-rw-r--r--src/cleaners/skyblock/pets.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/pets.ts b/src/cleaners/skyblock/pets.ts
index ac8d587..031924a 100644
--- a/src/cleaners/skyblock/pets.ts
+++ b/src/cleaners/skyblock/pets.ts
@@ -63,7 +63,7 @@ export async function cleanPets(data: typedHypixelApi.SkyBlockProfileMember): Pr
const itemList = await fetchItemList()
for (const petData of data.pets ?? []) {
- const xpTable = RARITY_XP_TABLES[petData.tier]
+ const xpTable = RARITY_XP_TABLES[petData.tier] ?? RARITY_XP_TABLES.LEGENDARY
const level = levelFromXpTable(petData.exp, xpTable)
const pet: Pet = {
id: petData.type,