Skip to content

Commit

Permalink
fix(fetchUser): fetchUser should only be called when enabled (#60)
Browse files Browse the repository at this point in the history
authors: @JesusCrow,  @breakingrobot
  • Loading branch information
Pooya Parsa committed Feb 7, 2018
1 parent cd6cdda commit beb3121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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()
}

// ---------------------------------------------------------------
Expand Down

0 comments on commit beb3121

Please sign in to comment.