Cleanup _.curry.

Former-commit-id: edcc8b2b4c67fa04d8c67e7b7fcdd071c4155e89
This commit is contained in:
John-David Dalton
2013-08-09 09:08:23 -07:00
parent 44c10d720a
commit f0f23d491c
2 changed files with 17 additions and 2 deletions

View File

@@ -1445,6 +1445,7 @@
var isBind = bitmask & 1,
isBindKey = bitmask & 2,
isCurry = bitmask & 4,
isPartial = bitmask & 8,
isPartialRight = bitmask & 16;
if (!isBindKey && !isFunction(func)) {
@@ -1458,10 +1459,10 @@
if (isCurry && !(bindData[1] & 4)) {
bindData[5] = arity;
}
if (partialArgs) {
if (isPartial) {
push.apply(bindData[2] || (bindData[2] = []), partialArgs);
}
if (partialRightArgs) {
if (isPartialRight) {
push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
}
bindData[1] |= bitmask;