mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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
|
||||
) => {
|
||||
// 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;
|
||||
}
|
||||
resources.forEach((resource) => {
|
||||
|
@ -229,9 +229,9 @@ export class LovelacePanel extends LitElement {
|
||||
}
|
||||
if (!resourcesLoaded) {
|
||||
resourcesLoaded = true;
|
||||
const resources = await (preloadWindow.llResProm ||
|
||||
fetchResources(this.hass!.connection));
|
||||
loadLovelaceResources(resources, this.hass!);
|
||||
(preloadWindow.llResProm || fetchResources(this.hass!.connection)).then(
|
||||
(resources) => loadLovelaceResources(resources, this.hass!)
|
||||
);
|
||||
}
|
||||
|
||||
if (this.urlPath !== null || !confProm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user