File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,6 @@ import authStore from './auth.store'
4
4
export default async function ( ctx , inject ) {
5
5
const { store } = ctx
6
6
7
- // Check axios module is correctly registered
8
- if ( ! ctx . $axios ) {
9
- /* eslint-disable no-console */
10
- console . error ( '[@nuxtjs/auth]' , 'Please make sure @nuxtjs/axios is added after this module!' )
11
- }
12
-
13
7
// Inject $ctx
14
8
inject ( 'ctx' , ctx )
15
9
@@ -21,5 +15,10 @@ export default async function (ctx, inject) {
21
15
await store . dispatch ( 'auth/fetch' )
22
16
} catch ( e ) {
23
17
// Not authorized
18
+ // Check axios module is correctly registered
19
+ if ( ! ctx . $axios ) {
20
+ /* eslint-disable no-console */
21
+ console . error ( '[@nuxtjs/auth]' , 'Please make sure @nuxtjs/axios is added after this module!' )
22
+ }
24
23
}
25
24
}
You can’t perform that action at this time.
0 commit comments