diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.js index aaf2c568d..2346c041e 100644 --- a/src/public/app/widgets/note_detail.js +++ b/src/public/app/widgets/note_detail.js @@ -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;