@wix/bex-utils 2.85.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.
@@ -39,7 +39,7 @@ var require_lodash = __commonJS({
39
39
  "use strict";
40
40
  (function() {
41
41
  var undefined2;
42
- var VERSION = "4.17.21";
42
+ var VERSION = "4.17.23";
43
43
  var LARGE_ARRAY_SIZE = 200;
44
44
  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`";
45
45
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
@@ -1967,8 +1967,28 @@ var require_lodash = __commonJS({
1967
1967
  }
1968
1968
  function baseUnset(object, path) {
1969
1969
  path = castPath(path, object);
1970
- object = parent(object, path);
1971
- return object == null || delete object[toKey(last(path))];
1970
+ var index = -1, length = path.length;
1971
+ if (!length) {
1972
+ return true;
1973
+ }
1974
+ var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
1975
+ while (++index < length) {
1976
+ var key = path[index];
1977
+ if (typeof key !== "string") {
1978
+ continue;
1979
+ }
1980
+ if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
1981
+ return false;
1982
+ }
1983
+ if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
1984
+ if (isRootPrimitive && index === 0) {
1985
+ continue;
1986
+ }
1987
+ return false;
1988
+ }
1989
+ }
1990
+ var obj = parent(object, path);
1991
+ return obj == null || delete obj[toKey(last(path))];
1972
1992
  }
1973
1993
  function baseUpdate(object, path, updater, customizer) {
1974
1994
  return baseSet(object, path, updater(baseGet(object, path)), customizer);