From 561495632c68ae8a3a444d935ba0f7d286a7f21e Mon Sep 17 00:00:00 2001 From: seditionist <84986004+seditionist@users.noreply.github.com> Date: Sun, 26 Nov 2023 18:55:26 -0500 Subject: [PATCH] Fix gamemode checks --- src/hiscores.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hiscores.ts b/src/hiscores.ts index 12b709b..d67497d 100644 --- a/src/hiscores.ts +++ b/src/hiscores.ts @@ -287,17 +287,13 @@ export async function getStats( const main = await getOfficialStats(rsn, 'main', options?.axiosConfigs?.main); - const emptyResponse: HiscoresResponse = { - skills: [], - activities: [] - }; const getModeStats = async ( mode: Extract ): Promise => otherGamemodes.includes(mode) ? getOfficialStats(rsn, mode, options?.axiosConfigs?.[mode]) - .catch(err => err) - : emptyResponse; + .catch(() => undefined) + : undefined; const formattedName = shouldGetFormattedRsn ? await getRSNFormat(rsn, options?.axiosConfigs?.rsn).catch( () => undefined