Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

fix: default sidebar workspace when account change

Smaug67399d2e5919bf98
diff --git a/frontend/app/composables/useNodesTree.ts b/frontend/app/composables/useNodesTree.ts
index a64b9f98..5325039c 100644
--- a/frontend/app/composables/useNodesTree.ts
+++ b/frontend/app/composables/useNodesTree.ts
@@ -108,6 +108,7 @@ export function useNodesTree() {
return tree.value.filter(item => item.data?.shared);
}
const workspace = tree.value.find(item => item.id === workspaceId);
+ if (!workspace) return tree.value;
return (workspace?.children as TreeItem<Node>[]) ?? [];
};