mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix timing issue when saving changes to notes
This commit is contained in:
		
							parent
							
								
									cfa4cc4931
								
							
						
					
					
						commit
						85215aa440
					
				@ -99,11 +99,14 @@ async function saveNote() {
 | 
			
		||||
    note.title = $noteTitle.val();
 | 
			
		||||
    note.content = getComponent(note.type).getContent();
 | 
			
		||||
 | 
			
		||||
    // it's important to set the flag back to false immediatelly after retrieving title and content
 | 
			
		||||
    // otherwise we might overwrite another change (especially async code)
 | 
			
		||||
    isNoteChanged = false;
 | 
			
		||||
 | 
			
		||||
    treeService.setNoteTitle(note.noteId, note.title);
 | 
			
		||||
 | 
			
		||||
    await server.put('notes/' + note.noteId, note.dto);
 | 
			
		||||
 | 
			
		||||
    isNoteChanged = false;
 | 
			
		||||
 | 
			
		||||
    if (note.isProtected) {
 | 
			
		||||
        protectedSessionHolder.touchProtectedSession();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user