Skip to content

Commit

Permalink
fix errors update
Browse files Browse the repository at this point in the history
  • Loading branch information
artola committed May 19, 2021
1 parent 61c3e92 commit 9b439b2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/formik/src/Formik.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ export function useFormik<Values extends FormikValues = FormikValues>({
return runAllValidations(values).then(combinedErrors => {
if (!!isMounted.current) {
dispatch({ type: 'SET_ISVALIDATING', payload: false });
if (!isEqual(state.errors, combinedErrors)) {
dispatch({ type: 'SET_ERRORS', payload: combinedErrors });
}
dispatch({ type: 'SET_ERRORS', payload: combinedErrors });
}
return combinedErrors;
});
Expand Down

0 comments on commit 9b439b2

Please sign in to comment.