Skip to content

Commit

Permalink
fix(main): set window bounds to store #1 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov authored Nov 27, 2021
1 parent 81908c3 commit d568291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/main/store/module/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const app = new Store({
schema: {
bounds: {
type: 'object',
default: null
default: {}
},
addToSubfolder: {
type: 'boolean',
Expand Down

0 comments on commit d568291

Please sign in to comment.