react-hook-form 7.43.7 → 7.43.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.
@@ -278,12 +278,6 @@ function useFormState(props) {
278
278
  });
279
279
  React.useEffect(() => {
280
280
  _mounted.current = true;
281
- const isDirty = control._proxyFormState.isDirty && control._getDirty();
282
- if (isDirty !== control._formState.isDirty) {
283
- control._subjects.state.next({
284
- isDirty,
285
- });
286
- }
287
281
  _localProxyFormState.current.isValid && control._updateValid(true);
288
282
  return () => {
289
283
  _mounted.current = false;
@@ -1101,15 +1095,12 @@ function useFieldArray(props) {
1101
1095
  if (control._options.resolver) {
1102
1096
  control._executeSchema([name]).then((result) => {
1103
1097
  const error = get(result.errors, name);
1104
- const existingError = get(control._formState.errors, name);
1105
- if (existingError ? !error && existingError.type : error && error.type) {
1106
- error
1107
- ? set(control._formState.errors, name, error)
1108
- : unset(control._formState.errors, name);
1109
- control._subjects.state.next({
1110
- errors: control._formState.errors,
1111
- });
1112
- }
1098
+ error
1099
+ ? set(control._formState.errors, name, error)
1100
+ : unset(control._formState.errors, name);
1101
+ control._subjects.state.next({
1102
+ errors: control._formState.errors,
1103
+ });
1113
1104
  });
1114
1105
  }
1115
1106
  else {