Don't assume atom.workspace is always defined

This commit is contained in:
Corey Johnson
2014-04-14 08:48:58 -07:00
parent 6dfbd5733d
commit 54b60a5253

View File

@@ -182,7 +182,7 @@ class Editor extends Model
@subscribe @$scrollTop, (scrollTop) => @emit 'scroll-top-changed', scrollTop
@subscribe @$scrollLeft, (scrollLeft) => @emit 'scroll-left-changed', scrollLeft
atom.workspace.editorAdded(this) if registerEditor
atom.workspace?.editorAdded(this) if registerEditor
serializeParams: ->
id: @id