Skip to content
Permalink
Browse files
fix(fetchUser): fetchUser should only be called when enabled (#60)
authors: @JesusCrow,  @breakingrobot
  • Loading branch information
Pooya Parsa committed Feb 7, 2018
1 parent cd6cdda commit beb31210cdb5f66080a8a6e660406ee5718ceb1e
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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.