fix: avoid errors

This commit is contained in:
Rairn 2023-04-14 23:34:58 +08:00
parent cd78192f84
commit 67dc21baf7

View File

@ -109,7 +109,7 @@ export const TableBlockProvider = (props) => {
} }
let childrenColumnName = 'children'; let childrenColumnName = 'children';
if (collection?.tree && treeTable !== false) { if (collection?.tree && treeTable !== false) {
if (resourceName.includes('.')) { if (resourceName?.includes('.')) {
const f = getCollectionField(resourceName); const f = getCollectionField(resourceName);
if (f?.treeChildren) { if (f?.treeChildren) {
childrenColumnName = f.name; childrenColumnName = f.name;