mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-30 22:34:53 +00:00
fix select bug when admin share repo to group (#5931)
This commit is contained in:
parent
f5fdebe5bb
commit
690d4a6a8c
@ -172,10 +172,8 @@ class SysAdminShareToGroup extends React.Component {
|
||||
shareToGroup = () => {
|
||||
let groups = [];
|
||||
let repoID = this.props.repoID;
|
||||
if (this.state.selectedOption && this.state.selectedOption.length > 0 ) {
|
||||
for (let i = 0; i < this.state.selectedOption.length; i ++) {
|
||||
groups[i] = this.state.selectedOption[i].id;
|
||||
}
|
||||
if (this.state.selectedOption) {
|
||||
groups[0] = this.state.selectedOption.id;
|
||||
}
|
||||
seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {
|
||||
let errorMsg = [];
|
||||
|
Loading…
Reference in New Issue
Block a user