Break out of loop to allow result object to be updated after failing fast

This commit is contained in:
Michael B. Gale
2026-07-13 14:47:38 +01:00
parent 3f1e4da48d
commit 0c2cea31ba
2 changed files with 13 additions and 6 deletions

6
lib/entry-points.js generated
View File

@@ -144556,14 +144556,14 @@ function checkSchema(schema, obj, options = {}, path29 = "") {
if (validator.required && !hasKey) {
result.valid = false;
if (options.failFast) {
return result;
break;
}
continue;
}
if (validator.required && (obj[key] === void 0 || obj[key] === null)) {
result.valid = false;
if (options.failFast) {
return result;
break;
}
continue;
}
@@ -144577,7 +144577,7 @@ function checkSchema(schema, obj, options = {}, path29 = "") {
if (!checkResult.valid) {
result.valid = false;
if (options.failFast) {
return result;
break;
}
continue;
}