Skip to content

Commit d06334e

Browse files
committed
Add comment about order when re-debouncing
1 parent 33c37fb commit d06334e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/utils/debounce.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
if (this.isActive()) {
5353
this._cancelAsync();
5454
this._timer = null;
55+
// Canceling a debouncer removes its spot from the flush queue,
56+
// so if a debouncer is manually canceled and re-debounced, it
57+
// will reset its flush order (this is a very minor difference from 1.x)
58+
// Re-debouncing via the `debounce` API retains the 1.x FIFO flush order
5559
debouncerQueue.delete(this);
5660
}
5761
}

0 commit comments

Comments
 (0)