Fix default range icon (#26069)

This commit is contained in:
karwosts 2025-07-04 14:34:38 -07:00 committed by GitHub
parent cc3234ad8f
commit e177012108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;