1
0
mirror of https://github.com/lexogrine/dota2-react-hud.git synced 2026-05-03 12:03:10 +02:00

fixed nullyfing

This commit is contained in:
Hubert Walczak
2024-09-04 10:51:53 +02:00
parent 820350d36b
commit 341d28bee9
+2 -2
View File
@@ -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")