Skip to content

Commit

Permalink
fix(infiniteScroll): ensure infinite doesn't fire when already loading
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Jun 1, 2016
1 parent d57833c commit f7b1f37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/infinite-scroll/infinite-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ export class InfiniteScroll {
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
if (distanceFromInfinite < 0) {
this._zone.run(() => {
this.state = STATE_LOADING;
this.ionInfinite.emit(this);
if (this.state !== STATE_LOADING && this.state !== STATE_DISABLED) {
this.state = STATE_LOADING;
this.ionInfinite.emit(this);
}
});
return 5;
}
Expand Down

0 comments on commit f7b1f37

Please sign in to comment.