mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Simplify delayed function in _.debounce.
Former-commit-id: 1f996fc3b6a8954053332739fdc0c2185fb1fd80
This commit is contained in:
@@ -5376,9 +5376,7 @@
|
|||||||
var isCalled = trailing && (!leading || callCount > 1);
|
var isCalled = trailing && (!leading || callCount > 1);
|
||||||
clear();
|
clear();
|
||||||
if (isCalled) {
|
if (isCalled) {
|
||||||
if (maxWait !== false) {
|
lastCalled = +new Date;
|
||||||
lastCalled = +new Date;
|
|
||||||
}
|
|
||||||
result = func.apply(thisArg, args);
|
result = func.apply(thisArg, args);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user