Skip to content

Commit

Permalink
Optimize throttle logic to ensure training call
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Aug 16, 2018
1 parent 2d19805 commit 239e3b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/InfiniteLoading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@
if (ev && ev.constructor === Event) {
if (!this.inThrottle) {
this.inThrottle = true;
this.attemptLoad();
setTimeout(() => { this.inThrottle = false; }, this.throttleLimit);
setTimeout(() => {
this.attemptLoad();
this.inThrottle = false;
}, this.throttleLimit);
}
} else {
this.attemptLoad();
Expand Down

0 comments on commit 239e3b0

Please sign in to comment.