Close #1181. Fix error "Cannot read property 'setScrollTop' of null"

This commit is contained in:
Glavin Wiechert 2016-09-25 14:52:44 -03:00
parent 70dbad5819
commit 803c35dfa4
1 changed files with 2 additions and 2 deletions

View File

@ -29,10 +29,10 @@ $ = null
# }
getScrollTop = (editor) ->
view = atom.views.getView(editor)
view.getScrollTop()
view?.getScrollTop()
setScrollTop = (editor, value) ->
view = atom.views.getView(editor)
view.setScrollTop value
view?.setScrollTop value
getCursors = (editor) ->
cursors = editor.getCursors()