Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/pages/ValidateLoginPage/index.website.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ class ValidateLoginPage extends Component {
isAuthenticated = () => Boolean(lodashGet(this.props, 'session.authToken', null));

/**
* Where SignIn was initiated on the current browser.
* Whether SignIn was initiated on the current browser.
* @returns {Boolean}
*/
isSignInInitiated = () => !this.isAuthenticated() && this.props.credentials && this.props.credentials.login;
isSignInInitiated = () => !this.isAuthenticated() && lodashGet(this.props, 'credentials.login', null);

render() {
return (
this.isOnPasswordlessBeta()
this.isOnPasswordlessBeta() && !this.isSignInInitiated() && !lodashGet(this.props, 'account.isLoading', true)
? (
<ValidateCodeModal
isSuccessfullySignedIn={this.state.justSignedIn}
Expand All @@ -109,8 +109,9 @@ ValidateLoginPage.defaultProps = defaultProps;
export default compose(
withLocalize,
withOnyx({
account: {key: ONYXKEYS.ACCOUNT},
betas: {key: ONYXKEYS.BETAS},
session: {key: ONYXKEYS.SESSION},
credentials: {key: ONYXKEYS.CREDENTIALS},
session: {key: ONYXKEYS.SESSION},
}),
)(ValidateLoginPage);