diff --git a/lodash.js b/lodash.js index 2b6bd3e22..ed305e448 100644 --- a/lodash.js +++ b/lodash.js @@ -3688,6 +3688,9 @@ * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } path = isKey(path, object) ? [path] : castPath(path); var index = -1,