Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 398e7f0

Browse files
committed
Fix edge-case which could cause session-restore to fail
1 parent a741e21 commit 398e7f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/bg/ui/session-watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class WindowWatcher extends EventEmitter {
117117
this.handleAlwaysOnTopChanged = this.handleAlwaysOnTopChanged.bind(this)
118118

119119
// right now this class trusts that the initial state is correctly formed by this point
120-
this.snapshot = initialState
120+
this.snapshot = JSON.parse(JSON.stringify(initialState))
121121
this.winId = win.id
122122
win.on('closed', this.handleClosed)
123123
win.on('resize', debounce(this.handlePositionChange, 1000))

app/bg/ui/windows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function createShellWindow (windowState, createOpts = {dontInitPages: fal
218218
}, frameSettings))
219219
win.once('ready-to-show', () => {
220220
win.show()
221-
updateWindowToolbar(win)
221+
updateWindowToolbar()
222222
if (!hasFirstWindowLoaded) {
223223
hasFirstWindowLoaded = true
224224
app.emit('custom-ready-to-show')

0 commit comments

Comments
 (0)