From 30530fde01184038e2569d0d1972c9ed95228b0d Mon Sep 17 00:00:00 2001 From: maxswa Date: Wed, 29 Jan 2020 12:24:59 -0500 Subject: [PATCH] Add catch for getRSNFormat error. --- src/hiscores.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hiscores.ts b/src/hiscores.ts index 894c441..ad695ce 100644 --- a/src/hiscores.ts +++ b/src/hiscores.ts @@ -46,13 +46,13 @@ export async function getStats(rsn: string): Promise { axios(getStatsURL('ironman', rsn)).catch(err => err), axios(getStatsURL('hardcore', rsn)).catch(err => err), axios(getStatsURL('ultimate', rsn)).catch(err => err), - getRSNFormat(rsn), + getRSNFormat(rsn).catch(() => undefined), ]); const [ironRes, hcRes, ultRes, formattedName] = otherResponses; const player: Player = { - name: formattedName, + name: formattedName || rsn, mode: 'main', dead: false, deulted: false,