mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't run afterAttach hooks twice on ReactEditorView
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user