mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 21:06:34 +00:00
Fix default range icon (#26069)
This commit is contained in:
parent
7fdf824e97
commit
b87fbe7a1e
@ -354,7 +354,10 @@ const getIconFromTranslations = (
|
||||
}
|
||||
// Then check for range-based icons if we have a numeric state
|
||||
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
||||
return getIconFromRange(Number(state), translations.range);
|
||||
return (
|
||||
getIconFromRange(Number(state), translations.range) ??
|
||||
translations.default
|
||||
);
|
||||
}
|
||||
// Fallback to default icon
|
||||
return translations.default;
|
||||
@ -518,7 +521,10 @@ export const domainIcon = async (
|
||||
}
|
||||
// Then check for range-based icons if we have a numeric state
|
||||
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
||||
return getIconFromRange(Number(state), translations.range);
|
||||
return (
|
||||
getIconFromRange(Number(state), translations.range) ??
|
||||
translations.default
|
||||
);
|
||||
}
|
||||
// Fallback to default icon
|
||||
return translations.default;
|
||||
|
Loading…
x
Reference in New Issue
Block a user