diff --git a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx index 73e14b2e9..34160ca9e 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx @@ -176,7 +176,7 @@ export const Templates = ({ style = {}, form }) => { filter: template?.dataScope, }, }} - onChange={(value) => handleTemplateDataChange(value.id, { ...value, ...template })} + onChange={(value) => handleTemplateDataChange(value?.id, { ...value, ...template })} targetField={getCollectionJoinField(`${template?.collection}.${template.titleField}`)} /> )}