Skip to content

Commit f2feb39

Browse files
jasonjiicloudjilingy
andauthored
if rule.message is null, it should be regarded as invalid, not only undefined (#20)
Co-authored-by: jilingy <[email protected]>
1 parent 0a02b9d commit f2feb39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Schema {
201201
if (!options.suppressWarning && errorList.length) {
202202
Schema.warning('async-validator:', errorList);
203203
}
204-
if (errorList.length && rule.message !== undefined) {
204+
if (errorList.length && rule.message !== undefined && rule.message !== null) {
205205
errorList = [].concat(rule.message);
206206
}
207207

0 commit comments

Comments
 (0)