summaryrefslogtreecommitdiffstats
path: root/apps/comments/src
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/src')
-rw-r--r--apps/comments/src/components/Comment.vue9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue
index edcaeafb7b6..d90d5a7fb6a 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())
},
},