We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e3445c commit 63741edCopy full SHA for 63741ed
src/system/function.ts
@@ -86,7 +86,6 @@ export function debounce<T extends (...args: any[]) => ReturnType<T>>(
86
87
function debounced(this: any, ...args: Parameters<T>) {
88
const time = Date.now();
89
- const isInvoking = shouldInvoke(time);
90
91
if (aggregator != null && lastArgs) {
92
lastArgs = aggregator(lastArgs, args);
@@ -98,13 +97,6 @@ export function debounce<T extends (...args: any[]) => ReturnType<T>>(
98
97
lastThis = this;
99
lastCallTime = time;
100
101
- if (isInvoking) {
102
- if (timer == null) {
103
- // Start the timer for the trailing edge.
104
- timer = setTimeout(timerExpired, wait);
105
- return result;
106
- }
107
108
if (timer == null) {
109
timer = setTimeout(timerExpired, wait);
110
}
0 commit comments