From bbe90c168392cfac0bec1959143d1a9090f65dd6 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 6 Dec 2018 11:49:33 +0100 Subject: [PATCH] Fix view without badges (#2192) --- src/panels/lovelace/editor/hui-edit-view.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/hui-edit-view.ts b/src/panels/lovelace/editor/hui-edit-view.ts index a6ed38966d..b73f3aca6a 100644 --- a/src/panels/lovelace/editor/hui-edit-view.ts +++ b/src/panels/lovelace/editor/hui-edit-view.ts @@ -79,7 +79,7 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) { ) { const { cards, badges, ...viewConfig } = this.viewConfig; this._config = viewConfig; - this._badges = processEditorEntities(badges); + this._badges = badges ? processEditorEntities(badges) : []; } else if (changedProperties.has("add")) { this._config = {}; this._badges = [];