mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
IE11 doesn't support Array.find so use underscore instead
This commit is contained in:
parent
681e67ecea
commit
a719ac6e6e
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ define [
|
|||
@removeHighlight(highlight)
|
||||
|
||||
findHighlightWithinRange: (range) ->
|
||||
@highlights.find (highlight) =>
|
||||
_.find @highlights, (highlight) =>
|
||||
@_doesHighlightOverlapRange highlight, range.start, range.end
|
||||
|
||||
_doesHighlightOverlapRange: (highlight, start, end) ->
|
||||
|
@ -69,7 +69,7 @@ define [
|
|||
!(highlightIsAllBeforeRange or highlightIsAllAfterRange)
|
||||
|
||||
clearHighlightTouchingRange: (range) ->
|
||||
highlight = @highlights.find (hl) =>
|
||||
highlight = _.find @highlights, (hl) =>
|
||||
@_doesHighlightTouchRange hl, range.start, range.end
|
||||
if highlight
|
||||
@removeHighlight highlight
|
||||
|
|
Loading…
Reference in a new issue