react-hook-form 7.25.2 → 7.25.3

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.
@@ -534,11 +534,11 @@ const useFieldArray = (props) => {
534
534
  }, true, false);
535
535
  };
536
536
  const replace = (value) => {
537
- const updatedFieldArrayValues = convertToArrayPayload(value);
537
+ const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));
538
538
  ids.current = updatedFieldArrayValues.map(generateId);
539
539
  updateValues([...updatedFieldArrayValues]);
540
540
  setFields([...updatedFieldArrayValues]);
541
- control._updateFieldArray(name, [...updatedFieldArrayValues], () => updatedFieldArrayValues, {}, true, false);
541
+ control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);
542
542
  };
543
543
  React.useEffect(() => {
544
544
  control._stateFlags.action = false;