diff options
author | mat <github@matdoes.dev> | 2022-04-10 19:56:25 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-04-10 19:56:25 -0500 |
commit | fffdfd3a9690fa1a491e8a45472162e770462ea3 (patch) | |
tree | 00d1831a0fc03b86b51801db4023fd2d478929b2 /src/cleaners/skyblock | |
parent | 69f88bee6afd00e0fd40a12398bd06ddbfb213e6 (diff) | |
download | skyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.tar.gz skyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.tar.bz2 skyblock-api-fffdfd3a9690fa1a491e8a45472162e770462ea3.zip |
Fix error when player has a weird pet rarity
Diffstat (limited to 'src/cleaners/skyblock')
-rw-r--r-- | src/cleaners/skyblock/pets.ts | 2 |
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, |