mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Quick fix for lovelace resources not loaded (#18430)
This commit is contained in:
parent
cf0fde0f3c
commit
d491d8f5ac
@ -11,7 +11,8 @@ export const loadLovelaceResources = (
|
|||||||
hass: HomeAssistant
|
hass: HomeAssistant
|
||||||
) => {
|
) => {
|
||||||
// Don't load ressources on safe mode
|
// Don't load ressources on safe mode
|
||||||
if (hass.config.safe_mode) {
|
// Sometimes, hass.config is null but it should not.
|
||||||
|
if (hass.config?.safe_mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resources.forEach((resource) => {
|
resources.forEach((resource) => {
|
||||||
|
@ -229,9 +229,9 @@ export class LovelacePanel extends LitElement {
|
|||||||
}
|
}
|
||||||
if (!resourcesLoaded) {
|
if (!resourcesLoaded) {
|
||||||
resourcesLoaded = true;
|
resourcesLoaded = true;
|
||||||
const resources = await (preloadWindow.llResProm ||
|
(preloadWindow.llResProm || fetchResources(this.hass!.connection)).then(
|
||||||
fetchResources(this.hass!.connection));
|
(resources) => loadLovelaceResources(resources, this.hass!)
|
||||||
loadLovelaceResources(resources, this.hass!);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.urlPath !== null || !confProm) {
|
if (this.urlPath !== null || !confProm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user