@conform-to/dom 1.1.1 → 1.1.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/formdata.js +2 -2
- package/formdata.mjs +2 -2
- package/package.json +1 -1
package/formdata.js
CHANGED
|
@@ -93,7 +93,7 @@ function setValue(target, name, valueFn) {
|
|
|
93
93
|
while (pointer != null && ++index < length) {
|
|
94
94
|
var key = paths[index];
|
|
95
95
|
var nextKey = paths[index + 1];
|
|
96
|
-
var newValue = index != lastIndex ? Object.
|
|
96
|
+
var newValue = index != lastIndex ? Object.prototype.hasOwnProperty.call(pointer, key) ? pointer[key] : typeof nextKey === 'number' ? [] : {} : valueFn(pointer[key]);
|
|
97
97
|
pointer[key] = newValue;
|
|
98
98
|
pointer = pointer[key];
|
|
99
99
|
}
|
|
@@ -108,7 +108,7 @@ function getValue(target, name) {
|
|
|
108
108
|
if (typeof pointer === 'undefined' || pointer == null) {
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
|
-
if (!Object.
|
|
111
|
+
if (!Object.prototype.hasOwnProperty.call(pointer, path)) {
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
if (isPlainObject(pointer) && typeof path === 'string') {
|
package/formdata.mjs
CHANGED
|
@@ -89,7 +89,7 @@ function setValue(target, name, valueFn) {
|
|
|
89
89
|
while (pointer != null && ++index < length) {
|
|
90
90
|
var key = paths[index];
|
|
91
91
|
var nextKey = paths[index + 1];
|
|
92
|
-
var newValue = index != lastIndex ? Object.
|
|
92
|
+
var newValue = index != lastIndex ? Object.prototype.hasOwnProperty.call(pointer, key) ? pointer[key] : typeof nextKey === 'number' ? [] : {} : valueFn(pointer[key]);
|
|
93
93
|
pointer[key] = newValue;
|
|
94
94
|
pointer = pointer[key];
|
|
95
95
|
}
|
|
@@ -104,7 +104,7 @@ function getValue(target, name) {
|
|
|
104
104
|
if (typeof pointer === 'undefined' || pointer == null) {
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
|
-
if (!Object.
|
|
107
|
+
if (!Object.prototype.hasOwnProperty.call(pointer, path)) {
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (isPlainObject(pointer) && typeof path === 'string') {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A set of opinionated helpers built on top of the Constraint Validation API",
|
|
4
4
|
"homepage": "https://conform.guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.2",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.mjs",
|
|
9
9
|
"types": "index.d.ts",
|