replace .filter with _.filter to remove dependency on ES5

This commit is contained in:
Brian Gough 2015-03-03 16:45:37 +00:00
parent c52a122966
commit 8d092fc84d

View file

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