Skip to content

Commit dd0638e

Browse files
author
Tony BRIET
committed
fix(fetchUser): fetchUser should only be called when enabled
2 parents 7b50160 + ff90b58 commit dd0638e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/templates/auth.class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class Auth {
3737
this.syncToken()
3838

3939
// Fetch user if is not available
40-
return this.state.user ? Promise.resolve() : this.fetchUser()
40+
return (!this.state.user && this.options.fetchUserOnLogin) ? this.fetchUser() : Promise.resolve()
4141
}
4242

4343
_registerVuexStore () {

0 commit comments

Comments
 (0)