Skip to content

Commit

Permalink
Fix infinite loop for container reaching end
Browse files Browse the repository at this point in the history
Issue sroze#186
  • Loading branch information
tot-ra committed May 13, 2015
1 parent 9fcbb88 commit 5413359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/infinite-scroll.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mod.directive 'infiniteScroll', ['$rootScope', '$window', '$interval', 'THROTTLE
elementBottom = height((elem[0].ownerDocument || elem[0].document).documentElement)

remaining = elementBottom - containerBottom
shouldScroll = remaining <= height(container) * scrollDistance + 1
shouldScroll = remaining < 0 && remaining <= height(container) * scrollDistance + 1

if shouldScroll
checkWhenEnabled = true
Expand Down

0 comments on commit 5413359

Please sign in to comment.