mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
fix: grantTypes undefined err (#654)
Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
@ -61,7 +61,7 @@ class ApplicationEditPage extends React.Component {
|
|||||||
getApplication() {
|
getApplication() {
|
||||||
ApplicationBackend.getApplication("admin", this.state.applicationName)
|
ApplicationBackend.getApplication("admin", this.state.applicationName)
|
||||||
.then((application) => {
|
.then((application) => {
|
||||||
if (application.grantTypes === null || application.grantTypes.length === 0) {
|
if (application.grantTypes === null || application.grantTypes === undefined || application.grantTypes.length === 0) {
|
||||||
application.grantTypes = ["authorization_code"];
|
application.grantTypes = ["authorization_code"];
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
|
Reference in New Issue
Block a user