Skip to content

Commit f7b1f37

Browse files
committed
fix(infiniteScroll): ensure infinite doesn't fire when already loading
1 parent d57833c commit f7b1f37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/infinite-scroll/infinite-scroll.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ export class InfiniteScroll {
178178
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
179179
if (distanceFromInfinite < 0) {
180180
this._zone.run(() => {
181-
this.state = STATE_LOADING;
182-
this.ionInfinite.emit(this);
181+
if (this.state !== STATE_LOADING && this.state !== STATE_DISABLED) {
182+
this.state = STATE_LOADING;
183+
this.ionInfinite.emit(this);
184+
}
183185
});
184186
return 5;
185187
}

0 commit comments

Comments
 (0)