mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Add debounce/throttle test for calling cancel and flush without anything queued.
This commit is contained in:
@@ -9137,10 +9137,9 @@
|
||||
}
|
||||
|
||||
function trailingEdge(time) {
|
||||
if (timerId !== undefined) {
|
||||
clearTimeout(timerId);
|
||||
timerId = undefined;
|
||||
}
|
||||
clearTimeout(timerId);
|
||||
timerId = undefined;
|
||||
|
||||
// Only invoke if we have `lastArgs` which means `func` has been
|
||||
// debounced at least once.
|
||||
if (trailing && lastArgs) {
|
||||
|
||||
Reference in New Issue
Block a user