Skip to content

Commit ad03b91

Browse files
committed
feat: use schema.isAsync to detect if we should do sync or async standard validation
1 parent 2107ab7 commit ad03b91

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/validator.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,8 @@ exports.entryAsync = async function (value, schema, prefs) {
188188

189189
exports.standard = function (value, schema) {
190190

191-
const settings = Common.defaults;
192191

193-
const result = internals.entry(value, schema, settings);
194-
if (result.mainstay.externals.length) {
192+
if (schema.isAsync()) {
195193
return exports.entryAsync(value, schema);
196194
}
197195

0 commit comments

Comments
 (0)