Skip to content

Commit a1fade3

Browse files
authored
fix: compliant with json schema
Signed-off-by: francesco <[email protected]>
1 parent 6932828 commit a1fade3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function buildInnerObject (context, location) {
369369
code += 'let json = JSON_STR_BEGIN_OBJECT\n'
370370

371371
let addComma = ''
372-
const hasComma = !hasRequiredProperties && (propertiesKeys.length > 1 || (schema.patternProperties || schema.additionalProperties))
372+
const hasComma = !hasRequiredProperties && (propertiesKeys.length > 1 || (schema.patternProperties || schema.additionalProperties !== false))
373373
if (hasComma) {
374374
code += 'let addComma = false\n'
375375
addComma = '!addComma && (addComma = true) || (json += JSON_STR_COMMA)'

0 commit comments

Comments
 (0)