@@ -51,8 +51,8 @@ import DynamicInput from '../dynamic-input/DynamicInput.vue';
5151
5252import { InputBase , FormControl } from ' ../../core/models' ;
5353import { dynamicFormsSymbol } from ' ../../useApi' ;
54- import { warn } from ' ../../core/utils/warning' ;
55-
54+ /* import { warn } from '../../core/utils/warning';
55+ */
5656const props = {
5757 form: {
5858 type: Object as PropType <DynamicForm >,
@@ -64,8 +64,8 @@ const components = {
6464 DynamicInput ,
6565};
6666
67- const AVAILABLE_THEMES = [' default' , ' material' ];
68-
67+ /* const AVAILABLE_THEMES = ['default', 'material'];
68+ */
6969export default defineComponent ({
7070 name: ' asDynamicForm' ,
7171 props ,
@@ -130,16 +130,20 @@ export default defineComponent({
130130 });
131131
132132 const formattedOptions = computed (() => {
133- const { customClass, method, netlify, netlifyHoneypot } = options .form ;
134- return {
135- class: [
136- customClass ,
137- /* validTheme.value ? `theme-${options.theme}` : null, */
138- ].join (' ' ),
139- method ,
140- ' data-netlify' : netlify ,
141- ' data-netlify-honeypot' : netlifyHoneypot ,
142- };
133+ if (options ?.form ) {
134+ const { customClass, method, netlify, netlifyHoneypot } = options ?.form ;
135+ return {
136+ class: [
137+ customClass ,
138+ /* validTheme.value ? `theme-${options.theme}` : null, */
139+ ].join (' ' ),
140+ method ,
141+ ' data-netlify' : netlify ,
142+ ' data-netlify-honeypot' : netlifyHoneypot ,
143+ };
144+ } else {
145+ return ;
146+ }
143147 });
144148
145149 function valueChange(changedValue : any ) {
0 commit comments