Skip to content

Commit 46047ba

Browse files
authored
fix: block posting while waiting for post to be posted (#1174)
1 parent 6f0b131 commit 46047ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/post/Editor.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -794,15 +794,16 @@ export default Vue.extend({
794794
postImages,
795795
)
796796
try {
797-
const cid: string = await sendRegularPost(p)
798797
this.hasPosted = true
798+
const cid: string = await sendRegularPost(p)
799799
this.title = ``
800800
this.subtitle = ``
801801
this.input = ``
802802
this.$store.commit(`draft/reset`)
803803
this.$store.commit(`settings/setRecentlyPosted`, true)
804804
this.$router.push(`/post/` + cid)
805805
} catch (err: unknown) {
806+
this.hasPosted = false
806807
this.$handleError(err)
807808
}
808809
}

0 commit comments

Comments
 (0)