@wix/bex-utils 2.86.0 → 2.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ var require_lodash = __commonJS({
40
40
  init_define_process_env();
41
41
  (function() {
42
42
  var undefined2;
43
- var VERSION = "4.17.21";
43
+ var VERSION = "4.17.23";
44
44
  var LARGE_ARRAY_SIZE = 200;
45
45
  var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
46
46
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
@@ -1968,8 +1968,28 @@ var require_lodash = __commonJS({
1968
1968
  }
1969
1969
  function baseUnset(object, path) {
1970
1970
  path = castPath(path, object);
1971
- object = parent(object, path);
1972
- return object == null || delete object[toKey(last(path))];
1971
+ var index = -1, length = path.length;
1972
+ if (!length) {
1973
+ return true;
1974
+ }
1975
+ var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
1976
+ while (++index < length) {
1977
+ var key = path[index];
1978
+ if (typeof key !== "string") {
1979
+ continue;
1980
+ }
1981
+ if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
1982
+ return false;
1983
+ }
1984
+ if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
1985
+ if (isRootPrimitive && index === 0) {
1986
+ continue;
1987
+ }
1988
+ return false;
1989
+ }
1990
+ }
1991
+ var obj = parent(object, path);
1992
+ return obj == null || delete obj[toKey(last(path))];
1973
1993
  }
1974
1994
  function baseUpdate(object, path, updater, customizer) {
1975
1995
  return baseSet(object, path, updater(baseGet(object, path)), customizer);