diff --git a/lodash.src.js b/lodash.src.js index 3a6a9f09f..6bc73ed09 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -2548,8 +2548,10 @@ * @returns {Object} Returns the destination object. */ function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObjectLike(object)) { + return object; + } var isSrcArr = isLength(source.length) && (isArray(source) || isTypedArray(source)); - (isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) { if (isObjectLike(srcValue)) { stackA || (stackA = []);