mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 23:13:49 +08:00
Fix null issue in getDefaultApplication()
This commit is contained in:
@ -179,6 +179,8 @@ class LoginPage extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
this.onUpdateApplication(null);
|
this.onUpdateApplication(null);
|
||||||
Setting.showMessage("error", res.msg);
|
Setting.showMessage("error", res.msg);
|
||||||
|
|
||||||
|
this.props.history.push("/404");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -189,13 +191,13 @@ class LoginPage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDefaultLoginMethod(application) {
|
getDefaultLoginMethod(application) {
|
||||||
if (application.enablePassword) {
|
if (application?.enablePassword) {
|
||||||
return "password";
|
return "password";
|
||||||
}
|
}
|
||||||
if (application.enableCodeSignin) {
|
if (application?.enableCodeSignin) {
|
||||||
return "verificationCode";
|
return "verificationCode";
|
||||||
}
|
}
|
||||||
if (application.enableWebAuthn) {
|
if (application?.enableWebAuthn) {
|
||||||
return "webAuthn";
|
return "webAuthn";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user