diff --git a/src/main/index.js b/src/main/index.js index e11351d..2422b62 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -30,7 +30,9 @@ function createWindow () { } mainWindow.on('close', e => { - store.app.set('bounds', mainWindow.getBounds()) + if (typeof mainWindow.getBounds() === 'object') { + store.app.set('bounds', mainWindow.getBounds()) + } }) return { mainWindow } diff --git a/src/main/store/module/app.js b/src/main/store/module/app.js index ad561fe..642fae6 100644 --- a/src/main/store/module/app.js +++ b/src/main/store/module/app.js @@ -6,7 +6,7 @@ const app = new Store({ schema: { bounds: { type: 'object', - default: null + default: {} }, addToSubfolder: { type: 'boolean',