From 629de594d55064fa3d23e8cfca9046de1c93de3b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 27 Feb 2016 10:15:51 -0800 Subject: [PATCH] Avoid deep cloning source values if a `customizer` is provided. --- lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 3496f8a1f..1a488d429 100644 --- a/lodash.js +++ b/lodash.js @@ -3184,7 +3184,7 @@ } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -3193,7 +3193,7 @@ } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue;