Catch LL config not found exception in preload (#5340)

This commit is contained in:
Paulus Schoutsen 2020-03-26 02:47:12 -07:00 committed by GitHub
parent a17c1052cd
commit cc046478e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,12 +92,12 @@ window.hassConnection.then(({ conn }) => {
subscribeFrontendUserData(conn, "core", noop);
if (location.pathname === "/" || location.pathname.startsWith("/lovelace/")) {
(window as WindowWithLovelaceProm).llConfProm = fetchConfig(
conn,
null,
false
);
(window as WindowWithLovelaceProm).llResProm = fetchResources(conn);
const llWindow = window as WindowWithLovelaceProm;
llWindow.llConfProm = fetchConfig(conn, null, false);
llWindow.llConfProm.catch(() => {
// Ignore it, it is handled by Lovelace panel.
});
llWindow.llResProm = fetchResources(conn);
}
});