Guarantee the window opening order

This commit is contained in:
Ash Wilson 2019-04-18 17:03:43 -04:00
parent 097906c23f
commit 9eb259ce20
No known key found for this signature in database
GPG Key ID: 81B1DDB704F69D2A

View File

@ -266,9 +266,12 @@ class AtomApplication extends EventEmitter {
optionsForWindowsToOpen.push(options) optionsForWindowsToOpen.push(options)
} }
return Promise.all( // Preserve window opening order
optionsForWindowsToOpen.map(options => this.openWithOptions(options)) const windows = []
) for (const options of optionsForWindowsToOpen) {
windows.push(await this.openWithOptions(options))
}
return windows
} }
openWithOptions (options) { openWithOptions (options) {