added missing calls in catch statements

This commit is contained in:
Phil Hughes 2018-02-02 16:33:38 +00:00
parent 645d635976
commit 965ff9653d
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
2 changed files with 10 additions and 3 deletions

View File

@ -53,6 +53,7 @@ $(() => {
});
})
.catch(() => {
mergeConflictsStore.setLoadingState(false);
mergeConflictsStore.setFailedRequest();
});
},

View File

@ -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