mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't assume atom.workspace is always defined
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user