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'];
|
params['sort'] = ['sort'];
|
||||||
}
|
}
|
||||||
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) {
|
||||||
|
@ -39,7 +39,7 @@ export const TableBlockDesigner = () => {
|
|||||||
const template = useSchemaTemplate();
|
const template = useSchemaTemplate();
|
||||||
const collection = useCollection();
|
const collection = useCollection();
|
||||||
const { dragSort, resource } = field.decoratorProps;
|
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();
|
const fixedBlockDesignerSetting = useFixedBlockDesignerSetting();
|
||||||
return (
|
return (
|
||||||
<GeneralSchemaDesigner template={template} title={title || name}>
|
<GeneralSchemaDesigner template={template} title={title || name}>
|
||||||
|
Loading…
Reference in New Issue
Block a user