From 0317eae926a80e1e5694fcb38a5257b556fdc3c9 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 18 Oct 2024 08:13:26 +0100 Subject: [PATCH] fix beatsaver map causing page to not load if it's unknown --- projects/backend/src/service/beatsaver.service.ts | 3 +++ projects/website/src/components/player/player-stats.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/backend/src/service/beatsaver.service.ts b/projects/backend/src/service/beatsaver.service.ts index 9ff910f..2537a16 100644 --- a/projects/backend/src/service/beatsaver.service.ts +++ b/projects/backend/src/service/beatsaver.service.ts @@ -33,6 +33,9 @@ export default class BeatSaverService { unknownMap: true, } ); + if (map.unknownMap) { + return undefined; + } return map.toObject() as BeatSaverMap; } } diff --git a/projects/website/src/components/player/player-stats.tsx b/projects/website/src/components/player/player-stats.tsx index 41f382c..8f4b36d 100644 --- a/projects/website/src/components/player/player-stats.tsx +++ b/projects/website/src/components/player/player-stats.tsx @@ -93,7 +93,7 @@ export default function PlayerStats({ player }: Props) { const stat = ; return tooltip ? ( - + {stat} ) : (