mirror of
https://github.com/lexogrine/dota2-react-hud.git
synced 2025-12-10 01:52:49 +01:00
fixed nullyfing
This commit is contained in:
parent
820350d36b
commit
341d28bee9
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user