feat: fix response data assignment error (#2123)

This commit is contained in:
Yaodong Yu
2023-07-24 14:52:30 +08:00
committed by GitHub
parent 3c4112dd44
commit 577bd6ce58
11 changed files with 28 additions and 29 deletions

View File

@ -129,19 +129,20 @@ class ApplicationEditPage extends React.Component {
return;
}
if (res.grantTypes === null || res.grantTypes === undefined || res.grantTypes.length === 0) {
res.grantTypes = ["authorization_code"];
const application = res.data;
if (application.grantTypes === null || application.grantTypes === undefined || application.grantTypes.length === 0) {
application.grantTypes = ["authorization_code"];
}
if (res.tags === null || res.tags === undefined) {
res.tags = [];
if (application.tags === null || application.tags === undefined) {
application.tags = [];
}
this.setState({
application: res.data,
application: application,
});
this.getCerts(res.organization);
this.getCerts(application.organization);
});
}