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 create full search note
zadam02016ed03193
diff --git a/src/routes/api/date_notes.js b/src/routes/api/date_notes.jsindex 02fb51813c..03c4ccee91 100644--- a/src/routes/api/date_notes.js+++ b/src/routes/api/date_notes.js@@ -66,7 +66,9 @@ function createSearchNote(req) {const searchString = params.searchString || "";let ancestorNoteId = params.ancestorNoteId;- const hoistedNote = cls.getHoistedNoteId() ? repository.getNote(cls.getHoistedNoteId()) : null;+ const hoistedNote = cls.getHoistedNoteId() && cls.getHoistedNoteId() !== 'root'+ ? repository.getNote(cls.getHoistedNoteId())+ : null;let searchHome;@@ -81,7 +83,7 @@ function createSearchNote(req) {|| dateNoteService.getDateNote(today);}- if (hoistedNote && hoistedNote.noteId !== 'root') {+ if (hoistedNote) {if (!hoistedNote.getDescendantNoteIds().includes(searchHome.noteId)) {// otherwise the note would be saved outside of the hoisted context which is weird