mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Capture the result of the last func call in _.throttle and _.debounce.
Former-commit-id: 2e783fad2e86824bf098bdb24ca6911317576f32
This commit is contained in:
@@ -3488,7 +3488,7 @@
|
||||
function delayed() {
|
||||
timeoutId = null;
|
||||
if (!immediate) {
|
||||
func.apply(thisArg, args);
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3674,7 +3674,7 @@
|
||||
function trailingCall() {
|
||||
lastCalled = new Date;
|
||||
timeoutId = null;
|
||||
func.apply(thisArg, args);
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
|
||||
return function() {
|
||||
|
||||
Reference in New Issue
Block a user