Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit cfd71ef

Browse files
committed
Skip schema validation when value is empty
1 parent 95fee4a commit cfd71ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/canner/src/hocs/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default function withValidation(Com: React.ComponentType<*>) {
130130
if(checkSchema(schema)) {
131131
promiseQueue.pop(_schemaValidation(schema, errorMessage)(value));
132132
}
133-
if(checkValidator(validator)) {
133+
if(value && checkValidator(validator)) {
134134
promiseQueue.pop(_customizedValidator(validator)(value));
135135
}
136136
}

0 commit comments

Comments
 (0)