mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Rename debounce helper to invokeFunc to fix builds.
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -9020,7 +9020,7 @@
|
|||||||
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
||||||
}
|
}
|
||||||
|
|
||||||
function invoke(time) {
|
function invokeFunc(time) {
|
||||||
var args = lastArgs,
|
var args = lastArgs,
|
||||||
thisArg = lastThis;
|
thisArg = lastThis;
|
||||||
|
|
||||||
@@ -9036,7 +9036,7 @@
|
|||||||
// Start the timer to the trailing edge.
|
// Start the timer to the trailing edge.
|
||||||
timerId = setTimeout(timerExpired, wait);
|
timerId = setTimeout(timerExpired, wait);
|
||||||
// Invoke the leading edge.
|
// Invoke the leading edge.
|
||||||
return leading ? invoke(lastCallTime) : result;
|
return leading ? invokeFunc(lastCallTime) : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function trailingEdge(time) {
|
function trailingEdge(time) {
|
||||||
@@ -9047,7 +9047,7 @@
|
|||||||
// Only invoke if we have `lastArgs`, which means there has been a call
|
// Only invoke if we have `lastArgs`, which means there has been a call
|
||||||
// to `func` since the last invocation
|
// to `func` since the last invocation
|
||||||
if (trailing && lastArgs) {
|
if (trailing && lastArgs) {
|
||||||
return invoke(time);
|
return invokeFunc(time);
|
||||||
}
|
}
|
||||||
lastArgs = lastThis = undefined;
|
lastArgs = lastThis = undefined;
|
||||||
return result;
|
return result;
|
||||||
@@ -9089,7 +9089,7 @@
|
|||||||
// Restart the timer.
|
// Restart the timer.
|
||||||
timerId = setTimeout(timerExpired, check.remainingWait);
|
timerId = setTimeout(timerExpired, check.remainingWait);
|
||||||
if (check.shouldInvoke) {
|
if (check.shouldInvoke) {
|
||||||
invoke(time);
|
invokeFunc(time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9116,7 +9116,7 @@
|
|||||||
// Check the current times to handle invocations in a tight loop.
|
// Check the current times to handle invocations in a tight loop.
|
||||||
var check = checkTimes(lastCallTime);
|
var check = checkTimes(lastCallTime);
|
||||||
return (check && check.shouldInvoke)
|
return (check && check.shouldInvoke)
|
||||||
? invoke(lastCallTime)
|
? invokeFunc(lastCallTime)
|
||||||
: result;
|
: result;
|
||||||
}
|
}
|
||||||
debounced.cancel = cancel;
|
debounced.cancel = cancel;
|
||||||
|
|||||||
Reference in New Issue
Block a user