Save only if status has something to save

This commit is contained in:
tusooa 2023-03-12 15:19:48 -04:00
parent 5e08c4537b
commit 3c39269be8
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
1 changed files with 5 additions and 1 deletions

View File

@ -672,7 +672,11 @@ const PostStatusForm = {
return propsToNative(props)
},
saveDraft () {
if (!this.saveInhibited) {
if (!this.saveInhibited &&
(this.newStatus.status ||
this.newStatus.files?.length ||
this.newStatus.hasPoll
)) {
this.$store.dispatch('addOrSaveDraft', { draft: this.newStatus })
.then(id => {
if (this.newStatus.id !== id) {