fixed interceptor

master
androiddrew 7 years ago
parent 8aef2f5177
commit 2676c2679c

1
.gitignore vendored

@ -1,3 +1,4 @@
node_modules/ node_modules/
dist/*.js dist/*.js
dist/*.css dist/*.css
.idea

@ -4,7 +4,7 @@ axios.defaults.baseURL = 'https://api.fullstackweekly.com'
// To avoid adding the token to every request we make to a service we can // To avoid adding the token to every request we make to a service we can
// instead use an interceptor // instead use an interceptor
axios.interceptor.request.use(function (config) { axios.interceptors.request.use(function (config) {
// added for when the code is running on a server for serverside rendering // added for when the code is running on a server for serverside rendering
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
return config return config

Loading…
Cancel
Save