diff --git a/src/form.js b/src/form.js index 0f3c3c3..58285c1 100644 --- a/src/form.js +++ b/src/form.js @@ -94,7 +94,7 @@ export const AutoForm = { _addAutoFormComponent: name => { const template = Component.getTemplate('AutoForm') if (template) { - $(template.content, '[control-wrapper]')?.appendChild(Util.makeDom(`<${name} $if="item.type.toUpperCase() === '${name.toUpperCase()}'" $name="item.name" $.="item.setting || {}" $bind="this.data[item.name]">`)) + $(template.content, '[control-wrapper]')?.appendChild(Util.makeDom(`<${name} $if="item.type?.toUpperCase() === '${name.toUpperCase()}'" $name="item.name" $.="item.setting || {}" $bind="this.data[item.name]">`)) } } }