From e86a74a0b734444d8d384edaf86fd9c81a721c8f Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 23 May 2024 20:12:11 +0300 Subject: [PATCH] Fix crash on users seasons tab --- app/features/user-page/routes/u.$identifier.seasons.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/features/user-page/routes/u.$identifier.seasons.tsx b/app/features/user-page/routes/u.$identifier.seasons.tsx index 5469752a9..d82b14c1f 100644 --- a/app/features/user-page/routes/u.$identifier.seasons.tsx +++ b/app/features/user-page/routes/u.$identifier.seasons.tsx @@ -83,14 +83,14 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { ); const { isAccurateTiers, userSkills } = _userSkills(season); - const { tier, ordinal } = userSkills[user.id] ?? { + const { tier, ordinal, approximate } = userSkills[user.id] ?? { approximate: false, ordinal: 0, tier: { isPlus: false, name: "IRON" }, }; return { - currentOrdinal: ordinal, + currentOrdinal: !approximate ? ordinal : undefined, winrates: { maps: seasonMapWinrateByUserId({ season, userId: user.id }), sets: seasonSetWinrateByUserId({ season, userId: user.id }),