diff --git a/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee b/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee index 29e99fdd02..09dcbadff6 100644 --- a/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee +++ b/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee @@ -253,7 +253,8 @@ define [ getVisiblePages = () -> top = element[0].scrollTop; 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] pageTop = pageElement.offsetTop pageBottom = pageTop + pageElement.clientHeight