mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Fix panels race
This commit is contained in:
parent
7caf37275d
commit
6e504020bf
@ -22,8 +22,11 @@ import { DEFAULT_PANEL } from "../common/const";
|
||||
const computeUrl = (urlPath) => `/${urlPath}`;
|
||||
|
||||
const computePanels = (hass: HomeAssistant) => {
|
||||
const isAdmin = hass.user.is_admin;
|
||||
const panels = hass.panels;
|
||||
if (!panels) {
|
||||
return [];
|
||||
}
|
||||
const isAdmin = hass.user.is_admin;
|
||||
const sortValue = {
|
||||
map: 1,
|
||||
logbook: 2,
|
||||
|
@ -80,7 +80,10 @@ class PartialPanelResolver extends HassRouterPage {
|
||||
|
||||
const oldHass = changedProps.get("hass") as this["hass"];
|
||||
|
||||
if (!oldHass || oldHass.panels !== this.hass!.panels) {
|
||||
if (
|
||||
this.hass!.panels &&
|
||||
(!oldHass || oldHass.panels !== this.hass!.panels)
|
||||
) {
|
||||
this._updateRoutes();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user