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 sidebar rerender during document fetch

Smaug673988e391da971b
diff --git a/frontend/app/stores/documents.store.ts b/frontend/app/stores/documents.store.ts
index d1375c41..3e24b911 100644
--- a/frontend/app/stores/documents.store.ts
+++ b/frontend/app/stores/documents.store.ts
@@ -100,7 +100,7 @@ export const useDocumentsStore = defineStore('documents', {
},
async fetch<T extends FetchOptions>(opts?: T): Promise<'id' extends keyof T ? Document : Document[]> {
console.log(`[store/documents] Fetching documents with options: ${JSON.stringify(opts)}`);
- this.isFetching = true;
+ if (!this.documents.length) this.isFetching = true;
const request = await makeRequest(`documents/@me/${opts?.id || ''}`, 'GET', {});
this.isFetching = false;
if (request.status == 'success') {