ignore spec window when saving application state

This commit is contained in:
darangi
2021-09-23 20:03:14 +01:00
parent 3f4b251702
commit eb60e44ca7

View File

@@ -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 }))
};