1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +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:
awu0403
2024-12-04 12:14:08 +08:00
committed by GitHub
parent 89213daeed
commit c9f9fe070b

View File

@@ -36,9 +36,9 @@ class SysAdminCreateRepoDialog extends React.Component {
};
handleSelectChange = (option) => {
// option can be null
// option can be `null`, `[{...}]`, or `[]`
this.setState({
ownerEmail: option ? option.email : ''
ownerEmail: option && option.length ? option[0].email : ''
});
};