Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/utils/axios_utils.js')
-rw-r--r--app/assets/javascripts/lib/utils/axios_utils.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/assets/javascripts/lib/utils/axios_utils.js b/app/assets/javascripts/lib/utils/axios_utils.js
index 69159e2d741..37721cd030c 100644
--- a/app/assets/javascripts/lib/utils/axios_utils.js
+++ b/app/assets/javascripts/lib/utils/axios_utils.js
@@ -10,21 +10,18 @@ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
axios.interceptors.request.use(config => {
window.activeVueResources = window.activeVueResources || 0;
window.activeVueResources += 1;
-
return config;
});
// Remove the global counter
axios.interceptors.response.use(
- config => {
+ response => {
window.activeVueResources -= 1;
-
- return config;
+ return response;
},
- e => {
+ err => {
window.activeVueResources -= 1;
-
- return Promise.reject(e);
+ return Promise.reject(err);
},
);