Skip to content

Commit

Permalink
fix(message): add error toast
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland committed May 31, 2022
1 parent dbfef1b commit 5a72d3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/views/chat/message/edit/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default Vue.extend({
},
methods: {
saveMessage() {
if (this.content.length === 0) {
if (this.content.trim().length === 0) {
this.$toast.error(this.$t('errors.chat.empty_message_error') as string)
return
}
this.$emit('commitMessage', this.content.slice(0, this.maxChars))
Expand Down

0 comments on commit 5a72d3e

Please sign in to comment.