mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Clear func in function created by _.before without requiring an additional call. [closes #1088]
This commit is contained in:
@@ -7375,7 +7375,8 @@
|
|||||||
return function() {
|
return function() {
|
||||||
if (--n > 0) {
|
if (--n > 0) {
|
||||||
result = func.apply(this, arguments);
|
result = func.apply(this, arguments);
|
||||||
} else {
|
}
|
||||||
|
if (n <= 1) {
|
||||||
func = null;
|
func = null;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user