File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ function build (schema, options) {
9393 functionsCounter : 0 ,
9494 functionsNamesBySchema : new Map ( ) ,
9595 options,
96- wrapObjects : true ,
9796 refResolver : new RefResolver ( ) ,
9897 rootSchemaId : schema . $id || `__fjs_root_${ schemaIdCounter ++ } ` ,
9998 validatorSchemasIds : new Set ( )
@@ -361,10 +360,8 @@ function buildInnerObject (context, location) {
361360
362361 code += `
363362 let addComma = false
364- let json = '${ context . wrapObjects ? '{' : '' } '
363+ let json = '{ '
365364 `
366- const wrapObjects = context . wrapObjects
367- context . wrapObjects = true
368365
369366 if ( schema . properties ) {
370367 for ( const key of Object . keys ( schema . properties ) ) {
@@ -408,9 +405,8 @@ function buildInnerObject (context, location) {
408405 code += buildExtraObjectPropertiesSerializer ( context , location )
409406 }
410407
411- context . wrapObjects = wrapObjects
412408 code += `
413- return json${ context . wrapObjects ? ' + \'}\'' : '' }
409+ return json + '}'
414410 `
415411 return code
416412}
You can’t perform that action at this time.
0 commit comments