Only allow ReactEditorView::beforeRemove to run once

This commit is contained in:
Nathan Sobo
2014-08-12 17:27:00 -06:00
parent 640881a15e
commit 94f40f0ed9

View File

@@ -122,8 +122,9 @@ class ReactEditorView extends View
@find('.lines').prepend(view)
beforeRemove: ->
React.unmountComponentAtNode(@element) if @component.isMounted()
return unless @attached
@attached = false
React.unmountComponentAtNode(@element) if @component.isMounted()
@trigger 'editor:detached', this
# Public: Split the editor view left.