Skip to content

Commit

Permalink
fix(Auth): register vuex store before all watchers
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Feb 3, 2018
1 parent e41af94 commit 006650f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/templates/auth.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default class Auth {
// Keep token out of the store for security reasons
Vue.set(this, 'token', null)

// Register vuex store
this._registerVuexStore()

// Reset on error
if (this.options.resetOnError) {
this._resetOnError()
Expand All @@ -27,8 +30,6 @@ export default class Auth {
if (this.options.watchLoggedIn && process.browser) {
this._watchLoggedIn()
}

this._registerVuexStore()
}

_registerVuexStore () {
Expand Down

0 comments on commit 006650f

Please sign in to comment.