mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Guarantee the window opening order
This commit is contained in:
@@ -266,9 +266,12 @@ class AtomApplication extends EventEmitter {
|
||||
optionsForWindowsToOpen.push(options)
|
||||
}
|
||||
|
||||
return Promise.all(
|
||||
optionsForWindowsToOpen.map(options => this.openWithOptions(options))
|
||||
)
|
||||
// Preserve window opening order
|
||||
const windows = []
|
||||
for (const options of optionsForWindowsToOpen) {
|
||||
windows.push(await this.openWithOptions(options))
|
||||
}
|
||||
return windows
|
||||
}
|
||||
|
||||
openWithOptions (options) {
|
||||
|
||||
Reference in New Issue
Block a user