mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
fix(client): cannot read properties of undefined
This commit is contained in:
parent
471b319b86
commit
fb0cdb704f
@ -96,7 +96,7 @@ export const TableBlockProvider = (props) => {
|
||||
params['sort'] = ['sort'];
|
||||
}
|
||||
let childrenColumnName = 'children';
|
||||
if (collection.tree && treeTable !== false) {
|
||||
if (collection?.tree && treeTable !== false) {
|
||||
if (resourceName.includes('.')) {
|
||||
const f = getCollectionField(resourceName);
|
||||
if (f?.treeChildren) {
|
||||
|
@ -39,7 +39,7 @@ export const TableBlockDesigner = () => {
|
||||
const template = useSchemaTemplate();
|
||||
const collection = useCollection();
|
||||
const { dragSort, resource } = field.decoratorProps;
|
||||
const treeChildren = resource.includes('.') ? getCollectionField(resource)?.treeChildren : !!collection?.tree;
|
||||
const treeChildren = resource?.includes('.') ? getCollectionField(resource)?.treeChildren : !!collection?.tree;
|
||||
const fixedBlockDesignerSetting = useFixedBlockDesignerSetting();
|
||||
return (
|
||||
<GeneralSchemaDesigner template={template} title={title || name}>
|
||||
|
Loading…
Reference in New Issue
Block a user