mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 07:09:02 +02:00
IE11 doesn't support Array.find so use underscore instead
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user