Protect against unhandled promises when calling checkForUpdates

pull/272/head
Scott Nonnenberg 6 years ago
parent b3eb0646c0
commit 0ec0ae9dac

@ -18,8 +18,12 @@ function autoUpdateDisabled() {
); );
} }
function checkForUpdates() { async function checkForUpdates() {
autoUpdater.checkForUpdates(); try {
await autoUpdater.checkForUpdates();
} catch (error) {
console.log('checkForUpdates error:', error.stack);
}
} }
let showingDialog = false; let showingDialog = false;

Loading…
Cancel
Save