mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fix race condition between script execution and saving, closes #4028
This commit is contained in:
		| @@ -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() { |     async printActiveNoteEvent() { | ||||||
|         if (!this.noteContext.isActive()) { |         if (!this.noteContext.isActive()) { | ||||||
|             return; |             return; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user