fix: plugin-core, collection compatibility (#935)

Reviewed-on: daoyoucloud/tachybase#935
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-05-08 23:09:31 +08:00 committed by sealday
parent 11e235b429
commit f1bc617cda

View File

@ -9,7 +9,8 @@ import { useSchemaTemplate } from '../../schema-templates';
export const BlockSchemaToolbar = (props) => {
const { t } = useTranslation();
const cm = useCollectionManager();
let { name: currentCollectionName, title: currentCollectionTitle } = useCollection();
const collecttion = useCollection();
let { name: currentCollectionName, title: currentCollectionTitle } = collecttion || {};
const template = useSchemaTemplate();
const { association } = useDataBlockProps() || {};
const compile = useCompile();