From 8435e97486dcddf45f0aa11abdab4a3dd047ffc2 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 10 Apr 2022 12:20:25 -0500 Subject: fix y200 century cake & throw error earlier when hypixel api returns null --- src/cleaners/skyblock/claimed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cleaners/skyblock') diff --git a/src/cleaners/skyblock/claimed.ts b/src/cleaners/skyblock/claimed.ts index f30dedf..0873af9 100644 --- a/src/cleaners/skyblock/claimed.ts +++ b/src/cleaners/skyblock/claimed.ts @@ -18,7 +18,7 @@ export function cleanPlayerSkyblockClaimed(data: typedHypixelApi.PlayerDataRespo const centuryCakes = Object.keys(data).filter((key) => key.startsWith('claimed_century_cake')) for (const centuryCake of centuryCakes) { - const centuryCakeYear = centuryCake === 'claimed_century_cake' ? '100' : centuryCakes.slice('claimed_century_cake'.length) + const centuryCakeYear = centuryCake === 'claimed_century_cake' ? '100' : centuryCake.slice('claimed_century_cake'.length) claimedItems.push({ name: `year_${centuryCakeYear}_century_cake`, timestamp: data[centuryCake] -- cgit