From 14651d8ea813091edc71bec32d264392a091d295 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 3 May 2015 17:20:51 -0700 Subject: [PATCH] Remove `customizer` assignment from `clone` and `cloneDeep`. --- lodash.src.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 2b078feec..52be9e686 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -8557,8 +8557,9 @@ customizer = isDeep; isDeep = false; } - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 1) : undefined; - return baseClone(value, isDeep, customizer); + return typeof customizer == 'function' + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + : baseClone(value, isDeep); } /** @@ -8607,8 +8608,9 @@ * // => 20 */ function cloneDeep(value, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 1) : undefined; - return baseClone(value, true, customizer); + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) + : baseClone(value, true); } /**