Skip to content

Commit e6b3555

Browse files
authored
fix: Check if errors argument is null first.
1 parent a9217db commit e6b3555

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/create-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const createForm = (config) => {
115115
return Promise.resolve()
116116
.then(() => validateFunction(values))
117117
.then((error) => {
118-
if (!util.getValues(error).length) {
118+
if (error == null || !util.getValues(error).length) {
119119
clearErrorsAndSubmit(values);
120120
} else {
121121
errors.set(error);

0 commit comments

Comments
 (0)