Skip to content

Commit

Permalink
fix: block posting while waiting for post to be posted (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispanag authored Sep 28, 2022
1 parent 6f0b131 commit 46047ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/post/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -794,15 +794,16 @@ export default Vue.extend({
postImages,
)
try {
const cid: string = await sendRegularPost(p)
this.hasPosted = true
const cid: string = await sendRegularPost(p)
this.title = ``
this.subtitle = ``
this.input = ``
this.$store.commit(`draft/reset`)
this.$store.commit(`settings/setRecentlyPosted`, true)
this.$router.push(`/post/` + cid)
} catch (err: unknown) {
this.hasPosted = false
this.$handleError(err)
}
}
Expand Down

0 comments on commit 46047ba

Please sign in to comment.