diff options
author | Phil Hughes <me@iamphill.com> | 2018-02-02 19:33:38 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-02-02 19:33:38 +0300 |
commit | 965ff9653dee8cc24c13502714e1dad9a2cdb3a2 (patch) | |
tree | d5fb22f9f93cf9621db885b3fa2438689ad3a1bf /app/assets | |
parent | 645d635976ef48905c0416bd2a4a25025fef9ee4 (diff) |
added missing calls in catch statements
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js index bc805047f73..b4b3c15108d 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js @@ -53,6 +53,7 @@ $(() => { }); }) .catch(() => { + mergeConflictsStore.setLoadingState(false); mergeConflictsStore.setFailedRequest(); }); }, diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 6151e90aa04..3e97a8c758d 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -2,7 +2,7 @@ import Cookies from 'js-cookie'; import axios from './lib/utils/axios_utils'; -import Flash from './flash'; +import flash from './flash'; import BlobForkSuggestion from './blob/blob_fork_suggestion'; import initChangesDropdown from './init_changes_dropdown'; import bp from './breakpoints'; @@ -257,7 +257,10 @@ export default class MergeRequestTabs { this.toggleLoading(false); }) - .catch(() => new Flash('An error occurred while fetching this tab.', 'alert')); + .catch(() => { + this.toggleLoading(false); + flash('An error occurred while fetching this tab.'); + }); } mountPipelinesView() { @@ -344,7 +347,10 @@ export default class MergeRequestTabs { this.toggleLoading(false); }) - .catch(() => Flash('An error occurred while fetching this tab.', 'alert')); + .catch(() => { + this.toggleLoading(false); + flash('An error occurred while fetching this tab.'); + }); } // Show or hide the loading spinner |