react-hook-form 6.15.7 → 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.esm.js CHANGED
@@ -1512,7 +1512,7 @@ const useFieldArray = ({ control, name, keyName = 'id', }) => {
1512
1512
  : getDefaultValues(defaultValuesRef.current)),
1513
1513
  ]);
1514
1514
  const [fields, setFields] = useState(mapIds(memoizedDefaultValues.current, keyName));
1515
- set(fieldArrayValuesRef.current, name, fields);
1515
+ set(fieldArrayValuesRef.current, name, compact(fields));
1516
1516
  const omitKey = (fields) => fields.map((_a = {}) => {
1517
1517
  var _b = keyName, omitted = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
1518
1518
  return rest;