From eb60e44ca73f00e6ccca7aceca70ae3d79594f4f Mon Sep 17 00:00:00 2001 From: darangi Date: Thu, 23 Sep 2021 20:03:14 +0100 Subject: [PATCH] ignore spec window when saving application state --- src/main-process/atom-application.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main-process/atom-application.js b/src/main-process/atom-application.js index cea5f070b5d..0346aaa498e 100644 --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js @@ -1474,9 +1474,14 @@ module.exports = class AtomApplication extends EventEmitter { async saveCurrentWindowOptions(allowEmpty = false) { if (this.quitting) return; + const windows = this.getAllWindows(); + const hasASpecWindow = windows.some(window => window.isSpec); + + if (windows.length === 1 && hasASpecWindow) return; + const state = { version: APPLICATION_STATE_VERSION, - windows: this.getAllWindows() + windows: windows .filter(window => !window.isSpec) .map(window => ({ projectRoots: window.projectRoots })) };