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
defensive programming, #3089
zadam5b73fe949e2c
diff --git a/src/routes/api/tree.js b/src/routes/api/tree.jsindex 95cd9d1c0a..7874814c20 100644--- a/src/routes/api/tree.js+++ b/src/routes/api/tree.js@@ -97,6 +97,11 @@ function getNotesAndBranchesAndAttributes(noteIds) {for (const attributeId of collectedAttributeIds) {const attribute = becca.attributes[attributeId];+ if (!attribute) {+ log.error(`Could not find attribute for attributeId=${attributeId}`);+ continue;+ }+attributes.push({attributeId: attribute.attributeId,noteId: attribute.noteId,