Fix bug where auto update would throw an exception when notifying app on quit

This commit is contained in:
Jeffrey Morgan
2015-04-20 09:43:15 -04:00
parent 624a49ef27
commit e7b2cabf5c
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "Kitematic",
"version": "0.5.16",
"version": "0.5.17",
"author": "Kitematic",
"description": "Simple Docker Container management for Mac OS X.",
"homepage": "https://kitematic.com/",

View File

@@ -44,8 +44,8 @@ SetupStore.setup().then(() => {
bugsnag.notify(err);
});
ipc.on('application:quitting', opts => {
if (!opts.updating && localStorage.getItem('settings.closeVMOnQuit') === 'true') {
ipc.on('application:quitting', () => {
if (localStorage.getItem('settings.closeVMOnQuit') === 'true') {
machine.stop();
}
});

View File

@@ -45,9 +45,9 @@ app.on('ready', function () {
});
app.on('before-quit', function () {
mainWindow.webContents.send('application:quitting', {
updating: updating
});
if (!updating) {
mainWindow.webContents.send('application:quitting');
}
});
mainWindow.webContents.on('new-window', function (e) {