mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Filter null badges (#3645)
* Convert weather-forecast to LitElement Part of https://github.com/home-assistant/home-assistant-polymer/issues/2095 Not sure how RTL works and how to apply it. Also, thinking I should update if the forecast changes and not just the state. Input? * Revert "Convert weather-forecast to LitElement" This reverts commit e1893b0a83f5973df7a28e5d30c3d4d0496155a1. * Filter out null badges Closes https://github.com/home-assistant/home-assistant-polymer/issues/2974 * address review comments * Update hui-view.ts
This commit is contained in:
parent
8a710202f1
commit
f2999c30f3
@ -264,7 +264,8 @@ export class HUIView extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const elements: HUIView["_badges"] = [];
|
const elements: HUIView["_badges"] = [];
|
||||||
const badges = processConfigEntities(config.badges);
|
// It's possible that a null value was stored as a badge entry
|
||||||
|
const badges = processConfigEntities(config.badges.filter(Boolean));
|
||||||
for (const badge of badges) {
|
for (const badge of badges) {
|
||||||
const element = document.createElement("ha-state-label-badge");
|
const element = document.createElement("ha-state-label-badge");
|
||||||
const entityId = badge.entity;
|
const entityId = badge.entity;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user