fix(map): cannot read properties of undefined (reading 'title')

This commit is contained in:
chenos 2023-02-15 15:58:09 +08:00
parent 1b5f3a38cf
commit b1b3e523c2

View File

@ -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 (