mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-19 18:28:42 +00:00
handle undefined and null in cast
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user