fix(infiniteScroll): ensure infinite doesn't fire when already loading

This commit is contained in:
Adam Bradley
2016-05-31 22:07:37 -05:00
parent d57833c81b
commit f7b1f373d3

View File

@ -178,8 +178,10 @@ export class InfiniteScroll {
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
if (distanceFromInfinite < 0) {
this._zone.run(() => {
if (this.state !== STATE_LOADING && this.state !== STATE_DISABLED) {
this.state = STATE_LOADING;
this.ionInfinite.emit(this);
}
});
return 5;
}