Fix the bug that sometimes cannot auto login with enableAutoSignin = true

This commit is contained in:
Yang Luo 2023-10-27 00:06:17 +08:00
parent a10548fe73
commit 1732cd8538

View File

@ -99,8 +99,10 @@ class LoginPage extends React.Component {
this.setState({enableCaptchaModal: CaptchaRule.Never});
}
}
}
if (this.props.account && this.props.account.owner === this.props.application?.organization) {
if (prevProps.account !== this.props.account && this.props.account !== undefined) {
if (this.props.account.owner === this.props.application?.organization) {
const params = new URLSearchParams(this.props.location.search);
const silentSignin = params.get("silentSignin");
if (silentSignin !== null) {