fix: fix response data assignment error in ApplicationEditPage.js (#2126)

This commit is contained in:
Yaodong Yu 2023-07-24 20:09:09 +08:00 committed by GitHub
parent 577bd6ce58
commit 0a9587901a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,13 +149,13 @@ class ApplicationEditPage extends React.Component {
getOrganizations() {
OrganizationBackend.getOrganizations("admin")
.then((res) => {
if (res?.status === "error") {
if (res.status === "error") {
this.setState({
isAuthorized: false,
});
} else {
this.setState({
organizations: (res.msg === undefined) ? res : [],
organizations: res.data || [],
});
}
});