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