Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix case where parents of templates are not loaded
zadam93d0324177a3
diff --git a/src/public/app/services/tree_cache.js b/src/public/app/services/tree_cache.jsindex c252aebbee..f8fe862ac1 100644--- a/src/public/app/services/tree_cache.js+++ b/src/public/app/services/tree_cache.js@@ -20,6 +20,9 @@ class TreeCache {async loadInitialTree() {const resp = await server.get('tree');+ // FIXME: we need to do this to cover for ascendants of template notes which are not loaded+ await this.loadParents(resp, false);+// clear the cache only directly before adding new content which is important for e.g. switching to protected session/** @type {Object.<string, NoteShort>} */@@ -40,6 +43,8 @@ class TreeCache {async loadSubTree(subTreeNoteId) {const resp = await server.get('tree?subTreeNoteId=' + subTreeNoteId);+ await this.loadParents(resp, true);+this.addResp(resp);return this.notes[subTreeNoteId];