mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	fix searching without hoisting
This commit is contained in:
		
							parent
							
								
									e73e1262ae
								
							
						
					
					
						commit
						f763e13996
					
				| @ -219,14 +219,9 @@ function getNoteTitle(noteId, parentNoteId) { | |||||||
| function getNoteTitleArrayForPath(path) { | function getNoteTitleArrayForPath(path) { | ||||||
|     const titles = []; |     const titles = []; | ||||||
| 
 | 
 | ||||||
|     if (path[0] === hoistedNoteService.getHoistedNoteId()) { |     if (path[0] === hoistedNoteService.getHoistedNoteId() && path.length === 1) { | ||||||
|         if (path.length === 1) { |  | ||||||
|         return [ getNoteTitle(hoistedNoteService.getHoistedNoteId()) ]; |         return [ getNoteTitle(hoistedNoteService.getHoistedNoteId()) ]; | ||||||
|     } |     } | ||||||
|         else { |  | ||||||
|             path = path.slice(1); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     let parentNoteId = 'root'; |     let parentNoteId = 'root'; | ||||||
|     let hoistedNotePassed = false; |     let hoistedNotePassed = false; | ||||||
| @ -257,13 +252,13 @@ function getNoteTitleForPath(path) { | |||||||
| 
 | 
 | ||||||
| function getSomePath(noteId, path) { | function getSomePath(noteId, path) { | ||||||
|     if (noteId === 'root') { |     if (noteId === 'root') { | ||||||
|  |         path.push(noteId); | ||||||
|  |         path.reverse(); | ||||||
|  | 
 | ||||||
|         if (!path.includes(hoistedNoteService.getHoistedNoteId())) { |         if (!path.includes(hoistedNoteService.getHoistedNoteId())) { | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         path.push(noteId); |  | ||||||
|         path.reverse(); |  | ||||||
| 
 |  | ||||||
|         return path; |         return path; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner