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.

feat: improve clear logic

MingLiang Wang84dd82aa968b
diff --git a/packages/data-center/src/workspace-unit-collection.ts b/packages/data-center/src/workspace-unit-collection.ts
index b51f5d160f..c44ef3feb0 100644
--- a/packages/data-center/src/workspace-unit-collection.ts
+++ b/packages/data-center/src/workspace-unit-collection.ts
@@ -122,9 +122,7 @@ export class WorkspaceUnitCollection {
};
const clear = () => {
- scopedWorkspaceIds.forEach(id => {
- remove(id);
- });
+ remove(Array.from(scopedWorkspaceIds));
};
const update = (workspaceId: string, meta: UpdateWorkspaceUnitParams) => {