mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
fix system admin create repo (#7116)
* fix system admin create repo * optimize code --------- Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
This commit is contained in:
@@ -36,9 +36,9 @@ class SysAdminCreateRepoDialog extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleSelectChange = (option) => {
|
handleSelectChange = (option) => {
|
||||||
// option can be null
|
// option can be `null`, `[{...}]`, or `[]`
|
||||||
this.setState({
|
this.setState({
|
||||||
ownerEmail: option ? option.email : ''
|
ownerEmail: option && option.length ? option[0].email : ''
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user