Assert the liveness of editor model when attaching editor view

This commit is contained in:
Nathan Sobo 2015-07-08 18:28:03 -05:00
parent 8bad01ca5b
commit 1dd1770b1a

View File

@ -62,6 +62,7 @@ class TextEditorElement extends HTMLElement
attachedCallback: ->
@buildModel() unless @getModel()?
atom.assert(@model.isAlive(), "Attaching a view for a destroyed editor")
@mountComponent() unless @component?
@component.checkForVisibilityChange()
if this is document.activeElement