mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 06:15:32 -05:00
replace .filter with _.filter to remove dependency on ES5
This commit is contained in:
parent
c52a122966
commit
8d092fc84d
1 changed files with 2 additions and 1 deletions
|
@ -253,7 +253,8 @@ define [
|
||||||
getVisiblePages = () ->
|
getVisiblePages = () ->
|
||||||
top = element[0].scrollTop;
|
top = element[0].scrollTop;
|
||||||
bottom = top + element[0].clientHeight;
|
bottom = top + element[0].clientHeight;
|
||||||
visiblePages = scope.pages.filter (page) ->
|
visiblePages = _.filter scope.pages, (page) ->
|
||||||
|
return false if not page.element?
|
||||||
pageElement = page.element[0]
|
pageElement = page.element[0]
|
||||||
pageTop = pageElement.offsetTop
|
pageTop = pageElement.offsetTop
|
||||||
pageBottom = pageTop + pageElement.clientHeight
|
pageBottom = pageTop + pageElement.clientHeight
|
||||||
|
|
Loading…
Reference in a new issue