Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: assert error when toolWrapper is null (#1048)

JimmFly520076b31df9
diff --git a/apps/web/src/pages/workspace/[workspaceId]/[pageId].tsx b/apps/web/src/pages/workspace/[workspaceId]/[pageId].tsx
index 94d8e9cfb2..dd566cf921 100644
--- a/apps/web/src/pages/workspace/[workspaceId]/[pageId].tsx
+++ b/apps/web/src/pages/workspace/[workspaceId]/[pageId].tsx
@@ -32,7 +32,9 @@ const BlockHubAppender = () => {
abortController.signal.addEventListener('abort', () => {
blockHubElement?.remove();
const toolWrapper = document.querySelector('#toolWrapper');
- assertEquals(toolWrapper?.childNodes.length, 0);
+ if (toolWrapper) {
+ assertEquals(toolWrapper.childNodes.length, 0);
+ }
});
editor?.createBlockHub().then(blockHub => {