|
|
@ -214,11 +214,13 @@ function useForm(
|
|
|
|
const errorList = results.filter(
|
|
|
|
const errorList = results.filter(
|
|
|
|
(result: { errors: string | any[] }) => result && result.errors.length,
|
|
|
|
(result: { errors: string | any[] }) => result && result.errors.length,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return Promise.reject({
|
|
|
|
return errorList.length
|
|
|
|
|
|
|
|
? Promise.reject({
|
|
|
|
values,
|
|
|
|
values,
|
|
|
|
errorFields: errorList,
|
|
|
|
errorFields: errorList,
|
|
|
|
outOfDate: lastValidatePromise !== summaryPromise,
|
|
|
|
outOfDate: lastValidatePromise !== summaryPromise,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
: Promise.resolve(values);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Do not throw in console
|
|
|
|
// Do not throw in console
|
|
|
|