mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix create full search note
This commit is contained in:
parent
cb91dadeca
commit
02016ed031
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user