Fix for views with url starting with a number (#5176)

This commit is contained in:
Bram Kragten 2020-03-12 20:49:26 +01:00 committed by GitHub
parent d327045802
commit 785ae4a83d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -476,7 +476,7 @@ class HUIRoot extends LitElement {
newSelectView = "hass-unused-entities";
} else if (this._routeData!.view) {
const selectedView = this._routeData!.view;
const selectedViewInt = parseInt(selectedView, 10);
const selectedViewInt = Number(selectedView);
let index = 0;
for (let i = 0; i < views.length; i++) {
if (views[i].path === selectedView || i === selectedViewInt) {