mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v4.10.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var baseCastPath = require('./_baseCastPath'),
|
||||
var castPath = require('./_castPath'),
|
||||
has = require('./has'),
|
||||
isKey = require('./_isKey'),
|
||||
last = require('./last'),
|
||||
@@ -13,7 +13,7 @@ var baseCastPath = require('./_baseCastPath'),
|
||||
* @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