fix post status for error handling

This commit is contained in:
Henry Jameson 2026-07-08 20:31:17 +03:00
commit 7bc74083d0

View file

@ -596,14 +596,16 @@ const PostStatusForm = {
? this.postHandler ? this.postHandler
: statusPoster.postStatus : statusPoster.postStatus
postHandler(postingOptions).then((data) => { postHandler(postingOptions)
if (!data.error) { .then((data) => {
this.abandonDraft() this.abandonDraft()
this.clearStatus() this.clearStatus()
this.$emit('posted', data) this.$emit('posted', data)
} else { })
this.error = data.error .catch((error) => {
} this.error = error
})
.finally(() => {
this.posting = false this.posting = false
}) })
}, },