mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Avoid leaking a data var in compat/legacy builds and remove dead code from the underscore build.
This commit is contained in:
8
dist/lodash.compat.js
vendored
8
dist/lodash.compat.js
vendored
@@ -1873,10 +1873,10 @@
|
||||
arity = 0;
|
||||
}
|
||||
// fast path for `_.bind`
|
||||
data = [func, bitmask, arity, thisArg, partialArgs, partialRightArgs];
|
||||
var newData = [func, bitmask, arity, thisArg, partialArgs, partialRightArgs];
|
||||
return (bitmask == BIND_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG))
|
||||
? baseBind(data)
|
||||
: baseCreateWrapper(data);
|
||||
? baseBind(newData)
|
||||
: baseCreateWrapper(newData);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4699,7 +4699,7 @@
|
||||
*/
|
||||
function curry(func, arity) {
|
||||
if (typeof arity != 'number') {
|
||||
arity = +arity || null;
|
||||
arity = +arity || (func ? func.length : 0);
|
||||
}
|
||||
return createWrapper(func, CURRY_FLAG, arity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user