diff --git a/packages/@core/ui-kit/form-ui/src/form-api.ts b/packages/@core/ui-kit/form-ui/src/form-api.ts index 2d1e971ab..c3d7b2bbe 100644 --- a/packages/@core/ui-kit/form-ui/src/form-api.ts +++ b/packages/@core/ui-kit/form-ui/src/form-api.ts @@ -404,9 +404,8 @@ export class FormApi { const deletedSchema = prevSchema.filter( (item) => !currentFields.has(item.fieldName), ); - for (const schema of deletedSchema) { - this.form?.setFieldValue(schema.fieldName, undefined); + this.form?.setFieldValue?.(schema.fieldName, undefined); } } }