From 87fc16af1944f786ea1b4bcd2e30044188b6b307 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 10 Nov 2015 07:40:16 -0800 Subject: [PATCH] Cleanup `createPartialWrapper`. --- lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index cb5e0d41b..8c0295e3f 100644 --- a/lodash.js +++ b/lodash.js @@ -4165,7 +4165,8 @@ argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, - args = Array(leftLength + argsLength); + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; @@ -4173,7 +4174,6 @@ while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, isBind ? thisArg : this, args); } return wrapper;