From 96caf9befa97eef3c1c4e7f9ad4d529455c91c56 Mon Sep 17 00:00:00 2001 From: Junyi Date: Tue, 22 Aug 2023 19:56:12 +0700 Subject: [PATCH] fix(plugin-fm): fix error when add attachment field to manual form assigned values (#2503) --- .../plugins/file-manager/src/client/interfaces/attachment.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugins/file-manager/src/client/interfaces/attachment.ts b/packages/plugins/file-manager/src/client/interfaces/attachment.ts index 20baa187d..0b108fb46 100644 --- a/packages/plugins/file-manager/src/client/interfaces/attachment.ts +++ b/packages/plugins/file-manager/src/client/interfaces/attachment.ts @@ -27,6 +27,9 @@ export const attachment: IField = { schema['x-component-props']['size'] = 'small'; } + if (!schema['x-component-props']) { + schema['x-component-props'] = {}; + } schema['x-component-props']['action'] = `${field.target}:create${ field.storage ? `?attachementField=${field.collectionName}.${field.name}` : '' }`;