various: dedupe invites to ships in search

This commit is contained in:
Matilde Park 2020-02-26 18:13:03 -05:00
parent dca7f6f8a7
commit db0fc609d8
3 changed files with 10 additions and 4 deletions

View File

@ -152,7 +152,9 @@ export class InviteSearch extends Component {
searchValue: "",
searchResults: { groups: [], ships: [] }
});
if (!ships.includes(ship)) {
ships.push(ship);
}
if (groups.length > 0) {
return false;
}

View File

@ -152,7 +152,9 @@ export class InviteSearch extends Component {
searchValue: "",
searchResults: { groups: [], ships: [] }
});
if (!ships.includes(ship)) {
ships.push(ship);
}
if (groups.length > 0) {
return false;
}

View File

@ -152,8 +152,10 @@ export class InviteSearch extends Component {
searchValue: "",
searchResults: { groups: [], ships: [] }
});
if (!ships.includes(ship)) {
ships.push(ship);
if (groups.length > 0) {
}
if ((groups.length > 0)) {
return false;
}
this.props.setInvite({ groups: groups, ships: ships });