From ff90b5830830c6c9ffd1a99292ea5b625ffab504 Mon Sep 17 00:00:00 2001 From: Paulius Varna Date: Wed, 7 Feb 2018 13:40:55 +0200 Subject: [PATCH] Fix calling fetchUser() without need Fix calling fetchUser() while fetchUserOnLogin() is disabled. --- lib/templates/auth.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/templates/auth.class.js b/lib/templates/auth.class.js index f898e7cd8..c0360382d 100644 --- a/lib/templates/auth.class.js +++ b/lib/templates/auth.class.js @@ -37,7 +37,7 @@ export default class Auth { this.syncToken() // Fetch user if is not available - return this.state.user ? Promise.resolve() : this.fetchUser() + return (!this.state.user && this.options.fetchUserOnLogin) ? this.fetchUser() : Promise.resolve() } _registerVuexStore () {