mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	hack when hoisted note is cloned then it could be filtered multiple times while we want only 1
This commit is contained in:
		
							parent
							
								
									721e5da672
								
							
						
					
					
						commit
						bf0fbe201e
					
				| @ -1210,7 +1210,16 @@ export default class NoteTreeWidget extends TabAwareWidget { | |||||||
|                 this.tree.clearFilter(); |                 this.tree.clearFilter(); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 this.tree.filterBranches(node => node.data.noteId === this.tabContext.hoistedNoteId); |                 let found = false; | ||||||
|  | 
 | ||||||
|  |                 // hack when hoisted note is cloned then it could be filtered multiple times while we want only 1
 | ||||||
|  |                 this.tree.filterBranches(node => { | ||||||
|  |                     if (found) { | ||||||
|  |                         return false; | ||||||
|  |                     } | ||||||
|  | 
 | ||||||
|  |                     return found = (node.data.noteId === this.tabContext.hoistedNoteId); | ||||||
|  |                 }); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam