From 884e17bea2aea566f87f3722eef2463b04eae4b5 Mon Sep 17 00:00:00 2001 From: Justin <38869875+justinlampley@users.noreply.github.com> Date: Thu, 5 Jan 2023 11:40:54 -0500 Subject: [PATCH] Fix auto updater issue caused by event timing --- src/main.dev.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.dev.ts b/src/main.dev.ts index 819030fb1..62e75a88a 100644 --- a/src/main.dev.ts +++ b/src/main.dev.ts @@ -397,6 +397,12 @@ app .catch((err: Error) => { logger.error(`createWindow error ${err}`); handleFatalError(err); + }) + .then(() => { + return updater?.checkForUpdates(); + }) + .catch((err: Error) => { + logger.error(`Auto update error ${err}`); }); app.on('activate', () => { @@ -407,10 +413,6 @@ app.on('activate', () => { } }); -app.on('ready', async () => { - updater?.checkForUpdates(); -}); - /* Handle IPC requests from the User Interface */