mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
fix: fix crash in UserEditPage.js
This commit is contained in:
parent
47f40c5b24
commit
27959e0f6f
@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user