From fffdfd3a9690fa1a491e8a45472162e770462ea3 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 10 Apr 2022 19:56:25 -0500 Subject: Fix error when player has a weird pet rarity --- src/cleaners/skyblock/pets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cleaners/skyblock') 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, -- cgit