diff options
author | silverwind <me@silverwind.io> | 2016-04-09 14:11:01 +0200 |
---|---|---|
committer | silverwind <me@silverwind.io> | 2016-04-10 11:46:08 +0200 |
commit | 2f6ff1bb64ac4f3e201039c8e83f8eb95f73c769 (patch) | |
tree | 710fe0778ca523281965244fdca60c4a031980e6 /tools/eslint/node_modules/lodash/_baseSet.js | |
parent | 8f4fdc93f07a06a62d4f867c6e0fd2f6287bb8be (diff) | |
download | node-new-2f6ff1bb64ac4f3e201039c8e83f8eb95f73c769.tar.gz |
tools: update ESLint to 2.7.0
PR-URL: https://github.com/nodejs/node/pull/6132
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
Diffstat (limited to 'tools/eslint/node_modules/lodash/_baseSet.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/_baseSet.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/eslint/node_modules/lodash/_baseSet.js b/tools/eslint/node_modules/lodash/_baseSet.js index 07b18406de..c903e41b5b 100644 --- a/tools/eslint/node_modules/lodash/_baseSet.js +++ b/tools/eslint/node_modules/lodash/_baseSet.js @@ -1,5 +1,5 @@ var assignValue = require('./_assignValue'), - baseToPath = require('./_baseToPath'), + baseCastPath = require('./_baseCastPath'), isIndex = require('./_isIndex'), isKey = require('./_isKey'), isObject = require('./isObject'); @@ -15,7 +15,7 @@ var assignValue = require('./_assignValue'), * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { - path = isKey(path, object) ? [path + ''] : baseToPath(path); + path = isKey(path, object) ? [path] : baseCastPath(path); var index = -1, length = path.length, @@ -30,7 +30,9 @@ function baseSet(object, path, value, customizer) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { - newValue = objValue == null ? (isIndex(path[index + 1]) ? [] : {}) : objValue; + newValue = objValue == null + ? (isIndex(path[index + 1]) ? [] : {}) + : objValue; } } assignValue(nested, key, newValue); |