Avoid issues with engines that can't manipulate arguments objects with array methods.

This commit is contained in:
John-David Dalton
2013-09-12 19:30:39 -07:00
parent 24b03d42d6
commit 36fcc460f4
7 changed files with 52 additions and 40 deletions

View File

@@ -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];