Don't run afterAttach hooks twice on ReactEditorView

This commit is contained in:
Nathan Sobo
2014-06-06 16:46:01 +09:00
parent 7dae04b8d4
commit fca6a7758b

View File

@@ -41,6 +41,8 @@ class ReactEditorView extends View
afterAttach: (onDom) ->
return unless onDom
return if @attached
@attached = true
props = defaults({@editor, parentView: this}, @props)
@component = React.renderComponent(EditorComponent(props), @element)