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