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: workspace unit setBlocksuiteWorkspace support null

alt07e608e48ecd9
diff --git a/packages/data-center/src/workspace-unit.ts b/packages/data-center/src/workspace-unit.ts
index 2fc4935d51..b7244c0b5e 100644
--- a/packages/data-center/src/workspace-unit.ts
+++ b/packages/data-center/src/workspace-unit.ts
@@ -42,7 +42,7 @@ export class WorkspaceUnit {
}
setBlocksuiteWorkspace(blocksuiteWorkspace: BlocksuiteWorkspace | null) {
- if (blocksuiteWorkspace?.room !== this.id) {
+ if (blocksuiteWorkspace && blocksuiteWorkspace?.room !== this.id) {
throw new Error('Workspace id inconsistent.');
}
this._blocksuiteWorkspace = blocksuiteWorkspace;