mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	isRoot check
This commit is contained in:
		@@ -141,7 +141,7 @@ async function processBranchChange(loadResults, ec) {
 | 
				
			|||||||
    const childNote = froca.notes[ec.entity.noteId];
 | 
					    const childNote = froca.notes[ec.entity.noteId];
 | 
				
			||||||
    let parentNote = froca.notes[ec.entity.parentNoteId];
 | 
					    let parentNote = froca.notes[ec.entity.parentNoteId];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (childNote && !parentNote) {
 | 
					    if (childNote && !childNote.isRoot() && !parentNote) {
 | 
				
			||||||
        // a branch cannot exist without the parent
 | 
					        // a branch cannot exist without the parent
 | 
				
			||||||
        // a note loaded into froca has to also contain all its ancestors
 | 
					        // a note loaded into froca has to also contain all its ancestors
 | 
				
			||||||
        // this problem happened e.g. in sharing where _share was hidden and thus not loaded
 | 
					        // this problem happened e.g. in sharing where _share was hidden and thus not loaded
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user