mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	fix race condition between script execution and saving, closes #4028
This commit is contained in:
		
							parent
							
								
									1b68adf3e4
								
							
						
					
					
						commit
						74400dad97
					
				@ -230,6 +230,15 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async runActiveNoteCommand(params) {
 | 
			
		||||
        if (this.isNoteContext(params.ntxId)) {
 | 
			
		||||
            // make sure that script is saved before running it #4028
 | 
			
		||||
            await this.spacedUpdate.updateNowIfNecessary();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return await this.parent.triggerCommand('runActiveNote', params);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async printActiveNoteEvent() {
 | 
			
		||||
        if (!this.noteContext.isActive()) {
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user