From 3c3010083789421ad9bf390f11e374bd70c7c017 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 3 Oct 2016 22:32:30 -0700 Subject: [PATCH] Use `baseFor` in `baseMerge`. --- lodash.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lodash.js b/lodash.js index 99826620e..59fb4e76c 100644 --- a/lodash.js +++ b/lodash.js @@ -3571,12 +3571,7 @@ if (object === source) { return; } - var props = isArray(source) ? undefined : baseKeysIn(source); - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } + baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); @@ -3591,7 +3586,7 @@ } assignMergeValue(object, key, newValue); } - }); + }, keysIn); } /**