mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
fix: fix crash in UserEditPage.js
This commit is contained in:
@@ -138,6 +138,10 @@ class UserEditPage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getUserOrganization() {
|
getUserOrganization() {
|
||||||
|
if (this.state.user === null || this.state.organizations.length === 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return this.state.organizations.filter(organization => organization.name === this.state.user.owner)[0];
|
return this.state.organizations.filter(organization => organization.name === this.state.user.owner)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user