From b1b3e523c230156289a7aac03940767ce782e116 Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 15 Feb 2023 15:58:09 +0800 Subject: [PATCH] fix(map): cannot read properties of undefined (reading 'title') --- packages/plugins/map/src/client/components/ReadPretty.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/map/src/client/components/ReadPretty.tsx b/packages/plugins/map/src/client/components/ReadPretty.tsx index 0c863ecca..e6b2e51da 100644 --- a/packages/plugins/map/src/client/components/ReadPretty.tsx +++ b/packages/plugins/map/src/client/components/ReadPretty.tsx @@ -12,10 +12,10 @@ const ReadPretty = (props) => { const field = useField(); useEffect(() => { - if (!field.title) { + if (!field.title && collectionField?.uiSchema?.title) { field.title = collectionField.uiSchema.title; } - }, collectionField.title); + }, collectionField?.title); if (!readOnly) return (