mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	fix Branch reference to parent note id after parent change
This commit is contained in:
		
							parent
							
								
									db44c1d8e6
								
							
						
					
					
						commit
						373408e401
					
				@ -158,7 +158,11 @@ class TreeCache {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        treeCache.childParentToBranch[childNoteId + '-' + newParentNoteId] = treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId];
 | 
			
		||||
        const branchId = treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId];
 | 
			
		||||
        const branch = await this.getBranch(branchId);
 | 
			
		||||
        branch.parentNoteId = newParentNoteId;
 | 
			
		||||
 | 
			
		||||
        treeCache.childParentToBranch[childNoteId + '-' + newParentNoteId] = branchId;
 | 
			
		||||
        delete treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId]; // this is correct because we know that oldParentId isn't same as newParentId
 | 
			
		||||
 | 
			
		||||
        // remove old associations
 | 
			
		||||
 | 
			
		||||
@ -60,7 +60,7 @@
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: space-around;
 | 
			
		||||
    padding: 10px 0 10px 0;
 | 
			
		||||
    margin: 0 10px 0 10px;
 | 
			
		||||
    margin: 0 20px 0 10px;
 | 
			
		||||
    border: 1px solid #ddd;
 | 
			
		||||
    border-radius: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user