diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-09-16 23:08:43 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-09-16 23:08:43 -0700 |
commit | 9280985306f5a9c79b9bd2c4daea596a5ec78ae5 (patch) | |
tree | 3feed98555c924983bbea83187ea35f8657bbc68 /ext/fg/js/source.js | |
parent | 5a531541238b52ba56475ae3f91873bd1b8a9d10 (diff) |
add option to automatically hide search results (fixes #71)
Diffstat (limited to 'ext/fg/js/source.js')
-rw-r--r-- | ext/fg/js/source.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js index 3b6ecb2a..664dbec7 100644 --- a/ext/fg/js/source.js +++ b/ext/fg/js/source.js @@ -82,7 +82,7 @@ class TextSourceRange { } equals(other) { - return other.range && other.range.compareBoundaryPoints(Range.START_TO_START, this.range) === 0; + return other && other.range && other.range.compareBoundaryPoints(Range.START_TO_START, this.range) === 0; } static shouldEnter(node) { @@ -239,6 +239,6 @@ class TextSourceElement { } equals(other) { - return other.element === this.element && other.content === this.content; + return other && other.element === this.element && other.content === this.content; } } |