react-hook-form 7.44.0 → 7.44.2

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.
@@ -49,7 +49,7 @@ function cloneObject(data) {
49
49
  }
50
50
  else {
51
51
  for (const key in data) {
52
- if (Object.hasOwn(data, key)) {
52
+ if (data.hasOwnProperty(key)) {
53
53
  copy[key] = cloneObject(data[key]);
54
54
  }
55
55
  }
@@ -582,7 +582,7 @@ function Form(props) {
582
582
  const shouldStringifySubmissionData = [
583
583
  headers && headers['Content-Type'],
584
584
  encType,
585
- ].includes('json');
585
+ ].some((value) => value && value.includes('json'));
586
586
  const response = await fetch(action, {
587
587
  method,
588
588
  headers: {
@@ -1005,7 +1005,7 @@ function baseGet(object, updatePath) {
1005
1005
  }
1006
1006
  function isEmptyArray(obj) {
1007
1007
  for (const key in obj) {
1008
- if (Object.hasOwn(obj, key) && !isUndefined(obj[key])) {
1008
+ if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
1009
1009
  return false;
1010
1010
  }
1011
1011
  }