diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-07-21 12:45:09 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-07-21 22:35:26 +0300 |
commit | a2b2f1ead7f247e37f8e07feb7e6d1ab9997bc00 (patch) | |
tree | 644c827f3f4a721cbc1b85aaa3237171100caa46 /app/assets/javascripts/notes/stores | |
parent | c09b5852a98dad9ccd1d66993021ec548695871c (diff) | |
download | gitlab-ce-a2b2f1ead7f247e37f8e07feb7e6d1ab9997bc00.tar.gz |
IssueNotesRefactor: Fix issue spinach tests.
Diffstat (limited to 'app/assets/javascripts/notes/stores')
-rw-r--r-- | app/assets/javascripts/notes/stores/issue_notes_store.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/stores/issue_notes_store.js b/app/assets/javascripts/notes/stores/issue_notes_store.js index 12ba1b06dfc..17b8da380a5 100644 --- a/app/assets/javascripts/notes/stores/issue_notes_store.js +++ b/app/assets/javascripts/notes/stores/issue_notes_store.js @@ -251,7 +251,12 @@ const actions = { context.commit('removePlaceholderNotes'); return res; - }); + }) + .catch(() => { + const msg = 'Your comment could not be submitted! Please check your network connection and try again.'; + Flash(msg, 'alert', $(noteData.flashContainer)); + context.commit('removePlaceholderNotes'); + }) }, poll(context) { const { notesPath } = $('.js-notes-wrapper')[0].dataset; |