Fix crash when converting form fields with a schema that doesn't contain a certain field

This commit is contained in:
Andrew Kingston 2023-09-04 09:05:33 +01:00
parent 401c12732f
commit cf33680b1e
1 changed files with 3 additions and 1 deletions

View File

@ -955,7 +955,9 @@ export const buildFormSchema = (component, asset) => {
const patched = convertOldFieldFormat(component.fields || [])
patched?.forEach(({ field, active }) => {
if (!active) return
if (info?.schema[field]) {
schema[field] = { type: info?.schema[field].type }
}
})
}