mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Avoid issues with engines that can't manipulate arguments objects with array methods.
This commit is contained in:
21
lodash.js
21
lodash.js
@@ -1539,15 +1539,18 @@
|
||||
var args = arguments,
|
||||
thisBinding = isBind ? thisArg : this;
|
||||
|
||||
if (isPartial) {
|
||||
unshift.apply(args, partialArgs);
|
||||
}
|
||||
if (isPartialRight) {
|
||||
push.apply(args, partialRightArgs);
|
||||
}
|
||||
if (isCurry && args.length < arity) {
|
||||
bitmask |= 16 & ~32;
|
||||
return createBound(func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity);
|
||||
if (isCurry || isPartial || isPartialRight) {
|
||||
args = nativeSlice.call(args);
|
||||
if (isPartial) {
|
||||
unshift.apply(args, partialArgs);
|
||||
}
|
||||
if (isPartialRight) {
|
||||
push.apply(args, partialRightArgs);
|
||||
}
|
||||
if (isCurry && args.length < arity) {
|
||||
bitmask |= 16 & ~32;
|
||||
return createBound(func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity);
|
||||
}
|
||||
}
|
||||
if (isBindKey) {
|
||||
func = thisBinding[key];
|
||||
|
||||
Reference in New Issue
Block a user