From 31878d7fe0c24a7b7a16f7982bd63b0518f76a48 Mon Sep 17 00:00:00 2001 From: x1a0t <405028157@qq.com> Date: Fri, 10 Feb 2023 17:41:16 +0800 Subject: [PATCH] fix: disable blockHub in an invitation page (#945) --- packages/app/src/components/editor/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/editor/index.tsx b/packages/app/src/components/editor/index.tsx index 46ea39204c..706fe0e9bb 100644 --- a/packages/app/src/components/editor/index.tsx +++ b/packages/app/src/components/editor/index.tsx @@ -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);