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.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: cloud workspace sometimes converted to local workspace (#4194)
Peng Xiaobf40d41c8637
diff --git a/packages/workspace/src/local/crud.ts b/packages/workspace/src/local/crud.tsindex 9594eaa30c..498a0837f8 100644--- a/packages/workspace/src/local/crud.ts+++ b/packages/workspace/src/local/crud.ts@@ -98,17 +98,10 @@ export const CRUD: WorkspaceCRUD<WorkspaceFlavour.LOCAL> = {list: async () => {logger.debug('list');const storage = getStorage();- let allWorkspaceIDs: string[] = storage.getItem(kStoreKey, []) as z.infer<+ const allWorkspaceIDs: string[] = storage.getItem(kStoreKey, []) as z.infer<typeof schema>;- // fixme: remove this once desktop data migration is done- if (window.apis && environment.isDesktop) {- const desktopIds = (await window.apis.workspace.list()).map(v => v[0]);- allWorkspaceIDs = [...new Set([...allWorkspaceIDs, ...desktopIds])];- storage.setItem(kStoreKey, allWorkspaceIDs);- }-const workspaces = (await Promise.all(allWorkspaceIDs.map(id => CRUD.get(id)))).filter(item => item !== null) as LocalWorkspace[];