Permalink
Browse files

fix(axios): ensure store exists before injecting

  • Loading branch information...
pi0 committed Jun 9, 2017
1 parent 9e0b50b commit 23ad7b75904f551388d7157f81af2aa0f99cf18c
Showing with 3 additions and 1 deletion.
  1. +3 −1 modules/axios/plugin.js
@@ -129,8 +129,10 @@ export default (ctx) => {

// Make accessible using *.$axios
app.$axios = axios
store.$axios = axios
ctx.$axios = axios
if(store) {
store.$axios = axios
}

// token helper for authentication
axios.setToken = setToken.bind(axios)

0 comments on commit 23ad7b7

Please sign in to comment.