mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
ignore spec window when saving application state
This commit is contained in:
@@ -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 }))
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user