mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	fix "root" note in edited notes, closes #2058
This commit is contained in:
		
							parent
							
								
									65938c5272
								
							
						
					
					
						commit
						a6bef45a30
					
				| @ -171,11 +171,20 @@ function getNotePath(noteId) { | |||||||
| 
 | 
 | ||||||
|     if (retPath) { |     if (retPath) { | ||||||
|         const noteTitle = getNoteTitleForPath(retPath); |         const noteTitle = getNoteTitleForPath(retPath); | ||||||
|         const parentNote = note.parents[0]; | 
 | ||||||
|  |         let branchId; | ||||||
|  | 
 | ||||||
|  |         if (note.noteId === 'root') { | ||||||
|  |             branchId = 'root'; | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |             const parentNote = note.parents[0]; | ||||||
|  |             branchId = noteCache.getBranch(noteId, parentNote.noteId).branchId; | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         return { |         return { | ||||||
|             noteId: noteId, |             noteId: noteId, | ||||||
|             branchId: noteCache.getBranch(noteId, parentNote.noteId).branchId, |             branchId: branchId, | ||||||
|             title: noteTitle, |             title: noteTitle, | ||||||
|             notePath: retPath, |             notePath: retPath, | ||||||
|             path: retPath.join('/') |             path: retPath.join('/') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam