refactor: refactor dataSource manager

This commit is contained in:
katherinehhh 2024-01-25 22:55:17 +08:00
parent e16945c652
commit 3c6e70f1cb

View File

@ -27,7 +27,7 @@ const defaultCollectionTransform = (collection: CollectionOptionsV2, app: Applic
...rest,
title: rawTitle ? title : app.i18n.t(title),
rawTitle: rawTitle || title,
fields: fields.map(({ uiSchema, ...field }) => {
fields: fields?.map(({ uiSchema, ...field }) => {
if (uiSchema?.title) {
const title = uiSchema.title;
uiSchema.title = uiSchema.rawTitle ? title : app.i18n.t(title, { ns: 'lm-collections' });