Remove custom value for unknown icon in icon picker (#28800)

This commit is contained in:
Paul Bottein 2026-01-05 11:57:09 +01:00 committed by GitHub
parent 6194f73442
commit 19934dad72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,20 +173,6 @@ export class HaIconPicker extends LitElement {
}
}
// Allow preview for custom icon not in list
if (rankedItems.length === 0) {
rankedItems.push({
item: {
id: filter,
primary: filter,
icon: filter,
search_labels: { keyword: filter },
sorting_label: filter,
},
rank: 0,
});
}
return rankedItems
.sort((itemA, itemB) => itemA.rank - itemB.rank)
.map((item) => item.item);