From 341d28bee92da9e3040388729123c8797d2014a0 Mon Sep 17 00:00:00 2001 From: Hubert Walczak Date: Wed, 4 Sep 2024 10:51:53 +0200 Subject: [PATCH] fixed nullyfing --- src/HUD/Scoreboard/Scoreboard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HUD/Scoreboard/Scoreboard.tsx b/src/HUD/Scoreboard/Scoreboard.tsx index 2aaaa54..d8ffe38 100644 --- a/src/HUD/Scoreboard/Scoreboard.tsx +++ b/src/HUD/Scoreboard/Scoreboard.tsx @@ -21,9 +21,9 @@ export function stringToClock(time: string | number, pad = true) { const ScoreboardPlayer = ({ player }: { player: Player }) => { const neutralItem = player.items.find(item => item.type === 'neutral'); - const facetIndex = player.hero?.facetIndex; + const facetIndex = player.hero?.facetIndex ?? null; const facets = heroFacets[(player.hero?.name || "")] ?? []; - const facet = facetIndex ? facets[facetIndex] : null; + const facet = facetIndex !== null ? facets[facetIndex] : null; if(facet){ const _facetUrl = getAssetURL(facet.icon, "facets")