Fix view without badges (#2192)

This commit is contained in:
Bram Kragten 2018-12-06 11:49:33 +01:00 committed by Paulus Schoutsen
parent 2fe1d04eb0
commit bbe90c1683

View File

@ -79,7 +79,7 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) {
) { ) {
const { cards, badges, ...viewConfig } = this.viewConfig; const { cards, badges, ...viewConfig } = this.viewConfig;
this._config = viewConfig; this._config = viewConfig;
this._badges = processEditorEntities(badges); this._badges = badges ? processEditorEntities(badges) : [];
} else if (changedProperties.has("add")) { } else if (changedProperties.has("add")) {
this._config = {}; this._config = {};
this._badges = []; this._badges = [];