diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index 01b6f03fb0..d748b8184e 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -93,7 +93,7 @@ class HcLovelace extends LitElement { } private get _viewIndex() { - if (this.viewPath === null) { + if (this.viewPath === null || this.viewPath === undefined) { return 0; } const selectedView = this.viewPath; diff --git a/cast/src/receiver/layout/hc-main.ts b/cast/src/receiver/layout/hc-main.ts index 64b821817a..cc0f3bc48f 100644 --- a/cast/src/receiver/layout/hc-main.ts +++ b/cast/src/receiver/layout/hc-main.ts @@ -270,7 +270,7 @@ export class HcMain extends HassElement { } this._error = undefined; - if (msg.urlPath === "lovelace") { + if (msg.urlPath === "lovelace" || msg.urlPath === undefined) { msg.urlPath = null; } this._lovelacePath = msg.viewPath;