Allow destroying AtomEnvironment instances that haven't been initialized

This commit is contained in:
Antonio Scandurra
2018-01-10 13:11:25 +01:00
parent 3e93c61173
commit e85b8738d1

View File

@@ -373,7 +373,7 @@ class AtomEnvironment {
if (this.project) this.project.destroy()
this.project = null
this.commands.clear()
this.stylesElement.remove()
if (this.stylesElement) this.stylesElement.remove()
this.config.unobserveUserConfig()
this.autoUpdater.destroy()
this.uriHandlerRegistry.destroy()