Wait to initialize auto update manager until config is loaded

This commit is contained in:
Max Brunsfeld
2018-04-25 09:33:53 -07:00
parent d233e20c32
commit 1ad9715e9d

View File

@@ -149,7 +149,6 @@ class AtomApplication extends EventEmitter {
this.config.set('core.titleBar', 'custom')
}
process.nextTick(() => this.autoUpdateManager.initialize())
this.applicationMenu = new ApplicationMenu(this.version, this.autoUpdateManager)
this.atomProtocolHandler = new AtomProtocolHandler(this.resourcePath, this.safeMode)
@@ -172,6 +171,7 @@ class AtomApplication extends EventEmitter {
if (!this.configFilePromise) {
this.configFilePromise = this.configFile.watch()
this.disposable.add(await this.configFilePromise)
this.autoUpdateManager.initialize()
this.config.onDidChange('core.titleBar', this.promptForRestart.bind(this))
}