@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.
@@ -18,7 +18,7 @@ var require_lodash = __commonJS({
18
18
  init_define_process_env();
19
19
  (function() {
20
20
  var undefined2;
21
- var VERSION = "4.17.21";
21
+ var VERSION = "4.17.23";
22
22
  var LARGE_ARRAY_SIZE = 200;
23
23
  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`";
24
24
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
@@ -1946,8 +1946,28 @@ var require_lodash = __commonJS({
1946
1946
  }
1947
1947
  function baseUnset(object, path) {
1948
1948
  path = castPath(path, object);
1949
- object = parent(object, path);
1950
- return object == null || delete object[toKey(last(path))];
1949
+ var index = -1, length = path.length;
1950
+ if (!length) {
1951
+ return true;
1952
+ }
1953
+ var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
1954
+ while (++index < length) {
1955
+ var key = path[index];
1956
+ if (typeof key !== "string") {
1957
+ continue;
1958
+ }
1959
+ if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
1960
+ return false;
1961
+ }
1962
+ if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
1963
+ if (isRootPrimitive && index === 0) {
1964
+ continue;
1965
+ }
1966
+ return false;
1967
+ }
1968
+ }
1969
+ var obj = parent(object, path);
1970
+ return obj == null || delete obj[toKey(last(path))];
1951
1971
  }
1952
1972
  function baseUpdate(object, path, updater, customizer) {
1953
1973
  return baseSet(object, path, updater(baseGet(object, path)), customizer);