mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Avoid issues with engines that can't manipulate arguments objects with array methods.
This commit is contained in:
21
dist/lodash.underscore.js
vendored
21
dist/lodash.underscore.js
vendored
@@ -666,15 +666,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