]> source.dussan.org Git - sonarqube.git/commitdiff
fix when sumit empty issue comment by keyboard
authorStas Vilchik <vilchiks@gmail.com>
Thu, 19 May 2016 12:26:54 +0000 (14:26 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 19 May 2016 13:54:32 +0000 (15:54 +0200)
server/sonar-web/src/main/js/components/issue/views/comment-form-view.js

index 1dca51c00ad4d2eba07343cac3b8d7144c18710d..4773d372c20ddfe49e016e1c5d66d13b5d26e670 100644 (file)
@@ -80,6 +80,11 @@ export default PopupView.extend({
   submit () {
     const that = this;
     const text = this.ui.textarea.val();
+
+    if (!text.length) {
+      return;
+    }
+
     const update = this.model && this.model.has('key');
     const method = update ? 'edit_comment' : 'add_comment';
     const url = window.baseUrl + '/api/issues/' + method;