Skip to content

Commit b7b194f

Browse files
committed
Use appropriate variable name for result from validation
1 parent 17f9e8c commit b7b194f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

assets/json-schema-faker.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24674,11 +24674,11 @@ function extend() {
2467424674
if (optionAPI('useExamplesValue') && 'example' in schema) {
2467524675
var clonedSchema,
2467624676
result,
24677-
finalResult,
24677+
isExampleValid,
2467824678
hashSchema = hash(schema);
2467924679

2468024680
if(seenSchemaMap.has(hashSchema)) {
24681-
finalResult = seenSchemaMap.get(hashSchema);
24681+
isExampleValid = seenSchemaMap.get(hashSchema);
2468224682
}
2468324683
else {
2468424684
// avoid minItems and maxItems while checking for valid examples
@@ -24696,12 +24696,12 @@ function extend() {
2469624696
}
2469724697

2469824698
// Store the final result that needs to be used in the seen map
24699-
finalResult = result && result.length === 0;
24700-
seenSchemaMap.set(hashSchema, finalResult);
24699+
isExampleValid = result && result.length === 0;
24700+
seenSchemaMap.set(hashSchema, isExampleValid);
2470124701
}
2470224702

2470324703
// Use example only if valid
24704-
if (finalResult) {
24704+
if (isExampleValid) {
2470524705
return schema.example;
2470624706
}
2470724707
}

0 commit comments

Comments
 (0)