mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 23:13:43 +08:00
fix "root" note in autocomplete when hoisted into another subtree
This commit is contained in:
parent
b567775129
commit
ef825371cf
1 changed files with 3 additions and 4 deletions
|
@ -83,10 +83,8 @@ function getNoteTitleArrayForPath(notePathArray) {
|
|||
throw new Error(`${notePathArray} is not an array.`);
|
||||
}
|
||||
|
||||
const hoistedNoteId = cls.getHoistedNoteId();
|
||||
|
||||
if (notePathArray.length === 1 && notePathArray[0] === hoistedNoteId) {
|
||||
return [getNoteTitle(hoistedNoteId)];
|
||||
if (notePathArray.length === 1) {
|
||||
return [getNoteTitle(notePathArray[0])];
|
||||
}
|
||||
|
||||
const titles = [];
|
||||
|
@ -95,6 +93,7 @@ function getNoteTitleArrayForPath(notePathArray) {
|
|||
let hoistedNotePassed = false;
|
||||
|
||||
// this is a notePath from outside of hoisted subtree so full title path needs to be returned
|
||||
const hoistedNoteId = cls.getHoistedNoteId();
|
||||
const outsideOfHoistedSubtree = !notePathArray.includes(hoistedNoteId);
|
||||
|
||||
for (const noteId of notePathArray) {
|
||||
|
|
Loading…
Reference in a new issue