diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue index edcaeafb7b6e9ce89e3ee019602a0c6988ad3371..d90d5a7fb6a3547c094f15f845a8f4aa03bc32e7 100644 --- a/apps/comments/src/components/Comment.vue +++ b/apps/comments/src/components/Comment.vue @@ -215,11 +215,16 @@ export default { * Dispatch message between edit and create */ onSubmit() { + // Do not submit if message is empty + if (this.localMessage.trim() === '') { + return + } + if (this.editor) { - this.onNewComment(this.localMessage) + this.onNewComment(this.localMessage.trim()) return } - this.onEditComment(this.localMessage) + this.onEditComment(this.localMessage.trim()) }, },