Skip to content

Commit

Permalink
Add comment about order when re-debouncing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Feb 28, 2019
1 parent 33c37fb commit d06334e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/utils/debounce.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
if (this.isActive()) {
this._cancelAsync();
this._timer = null;
// Canceling a debouncer removes its spot from the flush queue,
// so if a debouncer is manually canceled and re-debounced, it
// will reset its flush order (this is a very minor difference from 1.x)
// Re-debouncing via the `debounce` API retains the 1.x FIFO flush order
debouncerQueue.delete(this);
}
}
Expand Down

0 comments on commit d06334e

Please sign in to comment.