Skip to content

Commit 239e3b0

Browse files
committed
Optimize throttle logic to ensure training call
1 parent 2d19805 commit 239e3b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/InfiniteLoading.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@
134134
if (ev && ev.constructor === Event) {
135135
if (!this.inThrottle) {
136136
this.inThrottle = true;
137-
this.attemptLoad();
138-
setTimeout(() => { this.inThrottle = false; }, this.throttleLimit);
137+
setTimeout(() => {
138+
this.attemptLoad();
139+
this.inThrottle = false;
140+
}, this.throttleLimit);
139141
}
140142
} else {
141143
this.attemptLoad();

0 commit comments

Comments
 (0)