mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v4.4.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import baseToPath from './_baseToPath';
|
||||
import baseCastPath from './_baseCastPath';
|
||||
import has from './has';
|
||||
import isKey from './_isKey';
|
||||
import last from './last';
|
||||
@@ -13,7 +13,7 @@ import parent from './_parent';
|
||||
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
||||
*/
|
||||
function baseUnset(object, path) {
|
||||
path = isKey(path, object) ? [path + ''] : baseToPath(path);
|
||||
path = isKey(path, object) ? [path + ''] : baseCastPath(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