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.
@@ -1515,7 +1515,7 @@ const useFieldArray = ({ control, name, keyName = 'id', }) => {
1515
1515
  : getDefaultValues(defaultValuesRef.current)),
1516
1516
  ]);
1517
1517
  const [fields, setFields] = React.useState(mapIds(memoizedDefaultValues.current, keyName));
1518
- set(fieldArrayValuesRef.current, name, fields);
1518
+ set(fieldArrayValuesRef.current, name, compact(fields));
1519
1519
  const omitKey = (fields) => fields.map((_a = {}) => {
1520
1520
  var _b = keyName, omitted = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
1521
1521
  return rest;