Skip to content

Commit cc99959

Browse files
fix(core): warn when vuex store is not activated (#1195)
* fix(core): warn when vuex store is not activated * refactor(core): improve vuex warn message * refactor(core): fix typo in vuex warn * refactor(core): fix lint
1 parent 87126e3 commit cc99959

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/storage.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ export class Storage {
131131
this.state = this.ctx.store.state[this.options.vuex.namespace]
132132
} else {
133133
Vue.set(this, 'state', {})
134+
135+
// eslint-disable-next-line no-console
136+
console.warn(
137+
'[AUTH] The Vuex Store is not activated. This might cause issues in auth module behavior, like redirects not working properly.' +
138+
'To activate it, see https://nuxtjs.org/docs/2.x/directory-structure/store'
139+
)
134140
}
135141
}
136142

0 commit comments

Comments
 (0)