Avoid exceptions when a live editor is compared with a destroyed one

This commit is contained in:
Nathan Sobo 2014-01-07 18:45:18 -07:00
parent 5837b7cfda
commit 626e22e4ae

View File

@ -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())