mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Bump to v4.10.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define(['./_baseCastPath', './has', './_isKey', './last', './_parent'], function(baseCastPath, has, isKey, last, parent) {
|
||||
define(['./_castPath', './has', './_isKey', './last', './_parent'], function(castPath, has, isKey, last, parent) {
|
||||
|
||||
/**
|
||||
* The base implementation of `_.unset`.
|
||||
@@ -9,7 +9,7 @@ define(['./_baseCastPath', './has', './_isKey', './last', './_parent'], function
|
||||
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
||||
*/
|
||||
function baseUnset(object, path) {
|
||||
path = isKey(path, object) ? [path] : baseCastPath(path);
|
||||
path = isKey(path, object) ? [path] : castPath(path);
|
||||
object = parent(object, path);
|
||||
var key = last(path);
|
||||
return (object != null && has(object, key)) ? delete object[key] : true;
|
||||
|
||||
Reference in New Issue
Block a user