react-hook-form 6.15.5-beta.0 → 6.15.8
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.development.js +3 -5
- package/dist/index.cjs.development.js.map +1 -1
- package/dist/index.cjs.production.min.js +1 -1
- package/dist/index.cjs.production.min.js.map +1 -1
- package/dist/index.esm.js +3 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.ie11.development.js +3 -5
- package/dist/index.ie11.development.js.map +1 -1
- package/dist/index.ie11.production.min.js +1 -1
- package/dist/index.ie11.production.min.js.map +1 -1
- package/dist/index.umd.development.js +3 -5
- package/dist/index.umd.development.js.map +1 -1
- package/dist/index.umd.production.min.js +1 -1
- package/dist/index.umd.production.min.js.map +1 -1
- package/package.json +1 -1
@@ -863,9 +863,7 @@ function onDomRemove(fieldsRef, removeFieldEventListenerAndRef) {
|
|
863
863
|
return observer;
|
864
864
|
}
|
865
865
|
|
866
|
-
var isWeb = typeof window !== UNDEFINED &&
|
867
|
-
typeof window.HTMLElement !== UNDEFINED &&
|
868
|
-
typeof document !== UNDEFINED;
|
866
|
+
var isWeb = typeof window !== UNDEFINED && typeof document !== UNDEFINED;
|
869
867
|
|
870
868
|
function cloneObject(data) {
|
871
869
|
var e_1, _a, e_2, _b;
|
@@ -1978,7 +1976,7 @@ var useFieldArray = function (_a) {
|
|
1978
1976
|
? getDefaultValues(fieldArrayDefaultValuesRef.current)
|
1979
1977
|
: getDefaultValues(defaultValuesRef.current))));
|
1980
1978
|
var _d = __read(React.useState(mapIds(memoizedDefaultValues.current, keyName)), 2), fields = _d[0], setFields = _d[1];
|
1981
|
-
set(fieldArrayValuesRef.current, name, fields);
|
1979
|
+
set(fieldArrayValuesRef.current, name, compact(fields));
|
1982
1980
|
var omitKey = function (fields) { return fields.map(function (_a) {
|
1983
1981
|
if (_a === void 0) { _a = {}; }
|
1984
1982
|
var _b = keyName, omitted = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
@@ -2195,7 +2193,7 @@ var useFieldArray = function (_a) {
|
|
2195
2193
|
append: React.useCallback(append, [name]),
|
2196
2194
|
remove: React.useCallback(remove, [name]),
|
2197
2195
|
insert: React.useCallback(insert$1, [name]),
|
2198
|
-
fields: fields,
|
2196
|
+
fields: compact(fields),
|
2199
2197
|
};
|
2200
2198
|
};
|
2201
2199
|
|