mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Avoid exceptions when a live editor is compared with a destroyed one
This commit is contained in:
@@ -174,7 +174,8 @@ class Editor extends Model
|
||||
# Returns a {Boolean}.
|
||||
isEqual: (other) ->
|
||||
return false unless other instanceof Editor
|
||||
@buffer.getPath() == other.buffer.getPath() and
|
||||
@isAlive() == other.isAlive() and
|
||||
@buffer.getPath() == other.buffer.getPath() and
|
||||
@getScrollTop() == other.getScrollTop() and
|
||||
@getScrollLeft() == other.getScrollLeft() and
|
||||
@getCursorScreenPosition().isEqual(other.getCursorScreenPosition())
|
||||
|
||||
Reference in New Issue
Block a user