From bcfb58fdaa059de3d44ecf9d008717811ac23eb7 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 17 Feb 2022 20:47:15 +0000 Subject: [PATCH] [Splash] Wrap sendState in try catch --- src/splash/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/splash/index.js b/src/splash/index.js index 8a1c5cc..e3f39b1 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -79,7 +79,11 @@ const launchMainWindow = () => { } }; -const sendState = (status) => splashWindow && splashWindow.webContents.send('SPLASH_STATE', { status, ...splashState }); +const sendState = (status) => { + try { + splashWindow.webContents.send('SPLASH_STATE', { status, ...splashState }); + } catch (_e) {} +}; const launchSplashWindow = (startMinimized) => {