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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +3 -3
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/tsdoc-metadata.json +0 -11
package/dist/index.esm.mjs
CHANGED
@@ -49,7 +49,7 @@ function cloneObject(data) {
|
|
49
49
|
}
|
50
50
|
else {
|
51
51
|
for (const key in data) {
|
52
|
-
if (
|
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 (
|
1008
|
+
if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
|
1009
1009
|
return false;
|
1010
1010
|
}
|
1011
1011
|
}
|