Skip to content

Commit 006650f

Browse files
author
Pooya Parsa
committed
fix(Auth): register vuex store before all watchers
1 parent e41af94 commit 006650f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/templates/auth.class.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export default class Auth {
1818
// Keep token out of the store for security reasons
1919
Vue.set(this, 'token', null)
2020

21+
// Register vuex store
22+
this._registerVuexStore()
23+
2124
// Reset on error
2225
if (this.options.resetOnError) {
2326
this._resetOnError()
@@ -27,8 +30,6 @@ export default class Auth {
2730
if (this.options.watchLoggedIn && process.browser) {
2831
this._watchLoggedIn()
2932
}
30-
31-
this._registerVuexStore()
3233
}
3334

3435
_registerVuexStore () {

0 commit comments

Comments
 (0)