From 8a33d174d737052724f5cec49ef26c043f4603f9 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 8 Jun 2021 14:24:58 +0200 Subject: [PATCH] FIx selecting service/url path action after choosing default action (#9376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- src/panels/lovelace/components/hui-action-editor.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index 3bc6853ed2..91292ccfd1 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -33,18 +33,18 @@ export class HuiActionEditor extends LitElement { @property() protected hass?: HomeAssistant; get _navigation_path(): string { - const config = this.config as NavigateActionConfig; - return config.navigation_path || ""; + const config = this.config as NavigateActionConfig | undefined; + return config?.navigation_path || ""; } get _url_path(): string { - const config = this.config as UrlActionConfig; - return config.url_path || ""; + const config = this.config as UrlActionConfig | undefined; + return config?.url_path || ""; } get _service(): string { const config = this.config as CallServiceActionConfig; - return config.service || ""; + return config?.service || ""; } private _serviceAction = memoizeOne(