Guest User

Untitled

a guest
Oct 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. /**
  2. * plugins/axios-middleware.js
  3. */
  4.  
  5. import axios from 'axios';
  6.  
  7. axios.interceptors.response.use(response => {
  8. if( typeof response.data === 'object' && response.data.constructor !== Array ) {
  9. response.data = Object.assign({}, response.data);
  10. }
  11. return response;
  12. });
Add Comment
Please, Sign In to add comment