IE11 doesn't support Array.find so use underscore instead

This commit is contained in:
Alasdair Smith 2018-05-18 13:33:06 +01:00
parent 681e67ecea
commit a719ac6e6e

View file

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