Skip to content

Commit

Permalink
Fix auto updater issue caused by event timing
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlampley committed Jan 5, 2023
1 parent ca56cab commit 884e17b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -407,10 +413,6 @@ app.on('activate', () => {
}
});

app.on('ready', async () => {
updater?.checkForUpdates();
});

/*
Handle IPC requests from the User Interface
*/
Expand Down

0 comments on commit 884e17b

Please sign in to comment.