Skip to content

Commit

Permalink
fix(infiniteScroll): prevent error on infinite scroll complete with n…
Browse files Browse the repository at this point in the history
…ative scrolling Closes #3682
  • Loading branch information
perrygovier committed May 8, 2015
1 parent adea328 commit 86565e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/angular/controller/infiniteScrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function($scope, $attrs, $element, $timeout) {
$timeout(function() {
if (self.jsScrolling) self.scrollView.resize();
// only check bounds again immediately if the page isn't cached (scroll el has height)
if (self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) {
if ((self.jsScrolling && self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) ||
!self.jsScrolling) {
self.checkBounds();
}
}, 30, false);
Expand Down

0 comments on commit 86565e2

Please sign in to comment.