fix beatsaver map causing page to not load if it's unknown
All checks were successful
Deploy Backend / deploy (push) Successful in 3m46s
Deploy Website / deploy (push) Successful in 4m46s

This commit is contained in:
Lee 2024-10-18 08:13:26 +01:00
parent a636e7aa08
commit 0317eae926
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,9 @@ export default class BeatSaverService {
unknownMap: true,
}
);
if (map.unknownMap) {
return undefined;
}
return map.toObject() as BeatSaverMap;
}
}

View File

@ -93,7 +93,7 @@ export default function PlayerStats({ player }: Props) {
const stat = <StatValue key={index} color={badge.color} name={badge.name} value={value} />;
return tooltip ? (
<Tooltip asChild={false} display={tooltip}>
<Tooltip asChild={false} display={tooltip} key={index}>
{stat}
</Tooltip>
) : (