mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix "root" note in autocomplete when hoisted into another subtree
This commit is contained in:
		
							parent
							
								
									b567775129
								
							
						
					
					
						commit
						ef825371cf
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user