From cc046478e58cec4e76491a8d2f77519d0f6bdf85 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 26 Mar 2020 02:47:12 -0700 Subject: [PATCH] Catch LL config not found exception in preload (#5340) --- src/entrypoints/core.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/entrypoints/core.ts b/src/entrypoints/core.ts index c4cb7808e7..b45eb5fb48 100644 --- a/src/entrypoints/core.ts +++ b/src/entrypoints/core.ts @@ -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); } });