From 006650f7548bf8ecd7b49da653cebccb6c9ec959 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sun, 4 Feb 2018 02:17:59 +0330 Subject: [PATCH] fix(Auth): register vuex store before all watchers --- lib/templates/auth.class.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/templates/auth.class.js b/lib/templates/auth.class.js index 1c665edb8..510ac6166 100644 --- a/lib/templates/auth.class.js +++ b/lib/templates/auth.class.js @@ -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() @@ -27,8 +30,6 @@ export default class Auth { if (this.options.watchLoggedIn && process.browser) { this._watchLoggedIn() } - - this._registerVuexStore() } _registerVuexStore () {