fix: disable blockHub in an invitation page (#945)

This commit is contained in:
x1a0t
2023-02-10 17:41:16 +08:00
committed by GitHub
parent 6057c5637c
commit 31878d7fe0
+2 -1
View File
@@ -37,7 +37,8 @@ export const Editor = ({ page, workspace, setEditor }: Props) => {
editor.createBlockHub().then(blockHub => {
const toolWrapper = document.querySelector('#toolWrapper');
if (!toolWrapper) {
throw new Error('Can not find toolWrapper');
// In an invitation page there is no toolWrapper, which contains helper icon and blockHub icon
return;
}
blockHubElement = blockHub;
toolWrapper.appendChild(blockHub);