Skip to content

Commit

Permalink
fix(fetchUser): fetchUser should only be called when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
breakingrobot committed Feb 7, 2018
2 parents 7b50160 + ff90b58 commit dd0638e
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 dd0638e

Please sign in to comment.