diff --git a/src/formik.tsx b/src/formik.tsx index 10b60a4a2..2f7b53113 100644 --- a/src/formik.tsx +++ b/src/formik.tsx @@ -280,7 +280,7 @@ export function Formik({ if (validate) { const maybePromisedErrors = validate(values, this.props); if (isPromise(maybePromisedErrors)) { - (validate(values, this.props) as Promise).then( + (maybePromisedErrors as Promise).then( () => { this.setState({ errors: {} }); }, @@ -398,7 +398,7 @@ Formik cannot determine which value to update. For more info see https://github. const maybePromisedErrors = validate(this.state.values, this.props) || {}; if (isPromise(maybePromisedErrors)) { - (validate(this.state.values, this.props) as Promise).then( + (maybePromisedErrors as Promise).then( () => { this.setState({ errors: {} }); this.executeSubmit();