Skip to content

Commit beb3121

Browse files
author
Pooya Parsa
committed
fix(fetchUser): fetchUser should only be called when enabled (#60)
authors: @JesusCrow, @breakingrobot
1 parent cd6cdda commit beb3121

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/auth/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class Auth {
4545
this.syncToken()
4646

4747
// Fetch user if is not available
48-
return this.state.user ? Promise.resolve() : this.fetchUser()
48+
return (!this.state.user && this.options.fetchUserOnLogin) ? this.fetchUser() : Promise.resolve()
4949
}
5050

5151
// ---------------------------------------------------------------

0 commit comments

Comments
 (0)