Skip to content

Commit

Permalink
Fix calling fetchUser() without need
Browse files Browse the repository at this point in the history
Fix calling fetchUser() while fetchUserOnLogin() is disabled.
  • Loading branch information
varna committed Feb 7, 2018
1 parent 7b50160 commit ff90b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/templates/auth.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit ff90b58

Please sign in to comment.