b210cbca6c
Fix rubocop error
12 lines
348 B
JavaScript
12 lines
348 B
JavaScript
/* global Vue */
|
|
Vue.http.interceptors.push((request, next) => {
|
|
Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1;
|
|
|
|
next((response) => {
|
|
if (typeof response.data === 'string') {
|
|
response.data = JSON.parse(response.data); // eslint-disable-line
|
|
}
|
|
|
|
Vue.activeResources--; // eslint-disable-line
|
|
});
|
|
});
|