Skip to content

Commit

Permalink
Merge pull request #130 from Mikunj/auto-update-fix
Browse files Browse the repository at this point in the history
Auto update fix
  • Loading branch information
Mikunj committed Mar 29, 2020
2 parents 4483dee + 9d37ff9 commit 551a7d4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src-electron/main-process/auto-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ async function checkForUpdate(getMainWindow, onQuitAndInstall) {

try {
// Get the update using electron-updater
try {
const info = await autoUpdater.checkForUpdates();
if (!info.downloadPromise) {
console.info("auto-update: no update to download");
const info = await autoUpdater.checkForUpdates();
if (!info || !info.downloadPromise) {
console.info("auto-update: no update to download");

return;
}
return;
}

try {
await info.downloadPromise;
} catch (error) {
await showCannotUpdateDialog(getMainWindow());
Expand Down

0 comments on commit 551a7d4

Please sign in to comment.