File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import { snakeCaseToTitleCase } from "@/lib/strings" ;
2- import { JSONSchemaDefinition } from "@/types/forms" ;
32import { isArray , isObject } from "@/lib/type-guards" ;
3+ import { JSONSchemaDefinition } from "@/types/forms" ;
44
55export function isTextField ( schema : JSONSchemaDefinition ) {
66 return schema . type === "string" ;
@@ -97,7 +97,7 @@ export function generateDefaultValues(
9797 value === "True" ? true : value === "False" ? false : Boolean ( value ) ;
9898 } else {
9999 ( defaultValues as Record < string , any > ) [ key ] = isArray ( value )
100- ? value . map ( ( i ) => JSON . stringify ( i ) )
100+ ? value . map ( ( i ) => ( isObject ( i ) || isArray ( i ) ? JSON . stringify ( i ) : i ) )
101101 : isObject ( value )
102102 ? JSON . stringify ( value )
103103 : value ;
You can’t perform that action at this time.
0 commit comments