mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Bump to v4.11.2.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import baseProperty from './_baseProperty';
|
||||
import basePropertyDeep from './_basePropertyDeep';
|
||||
import isKey from './_isKey';
|
||||
import toKey from './_toKey';
|
||||
|
||||
/**
|
||||
* Creates a function that returns the value at `path` of a given object.
|
||||
@@ -25,7 +26,7 @@ import isKey from './_isKey';
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function property(path) {
|
||||
return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
|
||||
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
||||
}
|
||||
|
||||
export default property;
|
||||
|
||||
Reference in New Issue
Block a user