mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
fix: disable blockHub in an invitation page (#945)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user