fix: fix crash in UserEditPage.js

This commit is contained in:
Yaodong Yu 2023-08-16 15:57:48 +08:00
parent 47f40c5b24
commit 27959e0f6f

View File

@ -138,6 +138,10 @@ class UserEditPage extends React.Component {
}
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];
}