Merge pull request #4224 from iantrich/fix-filter-badge

Fix entity-filter-badge update
This commit is contained in:
Bram Kragten 2019-11-15 19:59:25 +01:00 committed by GitHub
commit 13c18a9bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,11 +109,12 @@ class EntityFilterBadge extends HTMLElement implements LovelaceBadge {
return; return;
} }
// Attach element if it has never been attached. while (this.lastChild) {
if (!this.lastChild) { this.removeChild(this.lastChild);
for (const element of this._elements) { }
this.appendChild(element);
} for (const element of this._elements) {
this.appendChild(element);
} }
this.style.display = "inline"; this.style.display = "inline";