mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Bump to v4.17.1.
This commit is contained in:
@@ -3,7 +3,8 @@ var arrayMap = require('./_arrayMap'),
|
||||
isArray = require('./isArray'),
|
||||
isSymbol = require('./isSymbol'),
|
||||
stringToPath = require('./_stringToPath'),
|
||||
toKey = require('./_toKey');
|
||||
toKey = require('./_toKey'),
|
||||
toString = require('./toString');
|
||||
|
||||
/**
|
||||
* Converts `value` to a property path array.
|
||||
@@ -26,7 +27,7 @@ function toPath(value) {
|
||||
if (isArray(value)) {
|
||||
return arrayMap(value, toKey);
|
||||
}
|
||||
return isSymbol(value) ? [value] : copyArray(stringToPath(value));
|
||||
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
||||
}
|
||||
|
||||
module.exports = toPath;
|
||||
|
||||
Reference in New Issue
Block a user