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