mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
various: dedupe invites to ships in search
This commit is contained in:
parent
dca7f6f8a7
commit
db0fc609d8
@ -152,7 +152,9 @@ export class InviteSearch extends Component {
|
||||
searchValue: "",
|
||||
searchResults: { groups: [], ships: [] }
|
||||
});
|
||||
ships.push(ship);
|
||||
if (!ships.includes(ship)) {
|
||||
ships.push(ship);
|
||||
}
|
||||
if (groups.length > 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -152,7 +152,9 @@ export class InviteSearch extends Component {
|
||||
searchValue: "",
|
||||
searchResults: { groups: [], ships: [] }
|
||||
});
|
||||
ships.push(ship);
|
||||
if (!ships.includes(ship)) {
|
||||
ships.push(ship);
|
||||
}
|
||||
if (groups.length > 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -152,8 +152,10 @@ export class InviteSearch extends Component {
|
||||
searchValue: "",
|
||||
searchResults: { groups: [], ships: [] }
|
||||
});
|
||||
ships.push(ship);
|
||||
if (groups.length > 0) {
|
||||
if (!ships.includes(ship)) {
|
||||
ships.push(ship);
|
||||
}
|
||||
if ((groups.length > 0)) {
|
||||
return false;
|
||||
}
|
||||
this.props.setInvite({ groups: groups, ships: ships });
|
||||
|
Loading…
Reference in New Issue
Block a user