We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9eecb41 commit a2b6c6dCopy full SHA for a2b6c6d
src/form-schema/index.ts
@@ -26,10 +26,10 @@ interface FormSchemaPluginOptions {
26
fields?: FieldsOption
27
}
28
29
-export const formSchema = definePlugin(({fields = []}: FormSchemaPluginOptions) => {
+export const formSchema = definePlugin((options: FormSchemaPluginOptions | undefined) => {
30
return {
31
name: 'form-toolkit_form-schema',
32
- schema: schema(fields),
+ schema: schema(options?.fields ?? []),
33
// plugins: [structureTool({defaultDocumentNode})],
34
35
})
0 commit comments