Permalink
Browse files

fix(fetchUser): fetchUser should only be called when enabled (#60)

  • Loading branch information...
pi0 committed Feb 7, 2018
1 parent cd6cdda commit beb31210cdb5f66080a8a6e660406ee5718ceb1e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/auth/auth.js
@@ -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()
}
// ---------------------------------------------------------------

0 comments on commit beb3121

Please sign in to comment.