Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * plugins/axios-middleware.js
- */
- import axios from 'axios';
- axios.interceptors.response.use(response => {
- if( typeof response.data === 'object' && response.data.constructor !== Array ) {
- response.data = Object.assign({}, response.data);
- }
- return response;
- });
Add Comment
Please, Sign In to add comment