mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.17.1.
This commit is contained in:
@@ -10,7 +10,7 @@ import baseSlice from './_baseSlice.js';
|
||||
* @returns {*} Returns the parent value.
|
||||
*/
|
||||
function parent(object, path) {
|
||||
return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||
}
|
||||
|
||||
export default parent;
|
||||
|
||||
Reference in New Issue
Block a user