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 NPE in note map, closes #2877
zadam8905148dbcdf
diff --git a/src/routes/api/note_map.js b/src/routes/api/note_map.jsindex 4458797a9b..9ec95851c0 100644--- a/src/routes/api/note_map.js+++ b/src/routes/api/note_map.js@@ -213,7 +213,7 @@ function findExcerpts(sourceNote, referencedNoteId) {let centerEl = linkEl;- while (centerEl.tagName !== 'BODY' && centerEl.parentElement.textContent.length <= EXCERPT_CHAR_LIMIT) {+ while (centerEl.tagName !== 'BODY' && centerEl.parentElement?.textContent?.length <= EXCERPT_CHAR_LIMIT) {centerEl = centerEl.parentElement;}