From 13dd07807958672f58efaea3d88690e1a2c559e0 Mon Sep 17 00:00:00 2001 From: SemmyWong <67748948+semmywong@users.noreply.github.com> Date: Wed, 24 Aug 2022 08:51:42 +0800 Subject: [PATCH] fix: fix uiSchema undefined (#770) --- packages/plugins/export/src/client/useExportAction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/export/src/client/useExportAction.ts b/packages/plugins/export/src/client/useExportAction.ts index 5f675f8fa..8ff927597 100644 --- a/packages/plugins/export/src/client/useExportAction.ts +++ b/packages/plugins/export/src/client/useExportAction.ts @@ -24,7 +24,7 @@ export const useExportAction = () => { const { uiSchema, interface: fieldInterface } = getCollectionJoinField(`${name}.${es.dataIndex.join('.')}`) ?? {}; es.enum = uiSchema?.enum?.map((e) => ({ value: e.value, label: e.label })); - if (!es.enum && uiSchema.type === 'boolean') { + if (!es.enum && uiSchema?.type === 'boolean') { es.enum = [ { value: true, label: t('Yes') }, { value: false, label: t('No') },