mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	fix deleting / erasing note
This commit is contained in:
		@@ -194,10 +194,15 @@ function deleteBranch(req) {
 | 
			
		||||
    const taskContext = TaskContext.getInstance(req.query.taskId, 'delete-notes');
 | 
			
		||||
 | 
			
		||||
    const deleteId = utils.randomString(10);
 | 
			
		||||
    const noteDeleted = branch.deleteBranch(deleteId, taskContext);
 | 
			
		||||
    let noteDeleted;
 | 
			
		||||
 | 
			
		||||
    if (eraseNotes) {
 | 
			
		||||
        // erase automatically means deleting all clones + note itself
 | 
			
		||||
        branch.getNote().deleteNote(deleteId, taskContext);
 | 
			
		||||
        noteService.eraseNotesWithDeleteId(deleteId);
 | 
			
		||||
        noteDeleted = true;
 | 
			
		||||
    } else {
 | 
			
		||||
        noteDeleted = branch.deleteBranch(deleteId, taskContext);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (last) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user