From dad461f4078db3d9d47986b28d7ae1ea518c30ad Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 8 Jan 2025 21:41:31 +0200 Subject: [PATCH] don't do this with autosave turned on --- src/components/post_status_form/post_status_form.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 71d6615f4..d6735319d 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -769,7 +769,9 @@ const PostStatusForm = { } this.saveable = false this.clearStatus() - this.$emit('draft-done') + if (!this.shouldAutoSaveDraft) { + this.$emit('draft-done') + } }) } else if (this.newStatus.id) { // There is a draft, but there is nothing in it, clear it @@ -777,7 +779,9 @@ const PostStatusForm = { .then(() => { this.saveable = false this.clearStatus() - this.$emit('draft-done') + if (!this.shouldAutoSaveDraft) { + this.$emit('draft-done') + } }) } }