Fix autoUpdater error in development

pull/749/head
lilia 8 years ago committed by Scott Nonnenberg
parent acd19fd759
commit 3b287185ef
No known key found for this signature in database
GPG Key ID: A4931C09644C654B

@ -83,12 +83,14 @@ function createWindow () {
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs. // Some APIs can only be used after this event occurs.
app.on('ready', function() { app.on('ready', function() {
autoUpdater.addListener('update-downloaded', function() { if (NODE_ENV === 'production') {
autoUpdater.quitAndInstall() autoUpdater.addListener('update-downloaded', function() {
}); autoUpdater.quitAndInstall()
autoUpdater.checkForUpdates(); });
autoUpdater.checkForUpdates();
setInterval(function() { autoUpdater.checkForUpdates(); }, autoUpdaterInterval);
}
setInterval(function() { autoUpdater.checkForUpdates(); }, autoUpdaterInterval);
createWindow(); createWindow();
}) })

Loading…
Cancel
Save