From b36e659c560a118b404f94d7ac214f090a5f1c6b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 9 Nov 2015 07:13:41 -0800 Subject: [PATCH] Avoid a circular dependency in `createHybridWrapper`. --- lodash.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index 80964a3f3..498ce317a 100644 --- a/lodash.js +++ b/lodash.js @@ -3931,7 +3931,7 @@ length -= argsHolders.length; if (length < arity) { - var result = createRecurryWrapper(func, bitmask, undefined, args, argsHolders, undefined, undefined, nativeMax(arity - length, 0)); + var result = createRecurryWrapper(func, bitmask, undefined, args, argsHolders, undefined, undefined, nativeMax(arity - length, 0), createHybridWrapper); result.placeholder = placeholder; return result; } @@ -4046,7 +4046,7 @@ length -= argsHolders.length; if (length < arity) { - var result = createRecurryWrapper(func, bitmask, thisArg, args, argsHolders, argPos, ary, nativeMax(arity - length, 0)); + var result = createRecurryWrapper(func, bitmask, thisArg, args, argsHolders, argPos, ary, nativeMax(arity - length, 0), createHybridWrapper); result.placeholder = placeholder; return result; } @@ -4070,7 +4070,7 @@ return wrapper; } - function createRecurryWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + function createRecurryWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity, wrapperFunc) { var isCurry = bitmask & CURRY_FLAG, isCurryBound = bitmask & CURRY_BOUND_FLAG, newArgPos = argPos ? copyArray(argPos) : undefined, @@ -4086,7 +4086,7 @@ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); } var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity], - result = createHybridWrapper.apply(undefined, newData); + result = wrapperFunc.apply(undefined, newData); if (isLaziable(func)) { setData(result, newData);