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: after load workspace, we need to close other workspace, not detory.

alt048d355ee72d2
diff --git a/packages/data-center/src/datacenter.ts b/packages/data-center/src/datacenter.ts
index cce3f8a308..0e6dee8271 100644
--- a/packages/data-center/src/datacenter.ts
+++ b/packages/data-center/src/datacenter.ts
@@ -164,7 +164,9 @@ export class DataCenter {
this._workspaceInstances.set(workspaceId, workspace);
await provider.warpWorkspace(workspace);
this._workspaceUnitCollection.workspaces.forEach(workspaceUnit => {
- workspaceUnit.setBlocksuiteWorkspace(null);
+ const provider = this.providerMap.get(workspaceUnit.provider);
+ assert(provider);
+ provider.closeWorkspace(workspaceUnit.id);
});
workspaceUnit.setBlocksuiteWorkspace(workspace);
return workspaceUnit;