mirror of
https://github.com/urbit/shrub.git
synced 2024-12-18 07:42:20 +03:00
publish: invite-search shows valid ship in results
This commit is contained in:
parent
7aeb593fb4
commit
c4bba73833
@ -69,6 +69,18 @@ export class InviteSearch extends Component {
|
||||
this.setState({
|
||||
searchResults: { groups: groupMatches, ships: shipMatches }
|
||||
});
|
||||
|
||||
let isValid = true;
|
||||
if (!urbitOb.isValidPatp("~" + searchTerm)) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if ((shipMatches.length === 0) && (isValid)) {
|
||||
shipMatches.push(searchTerm);
|
||||
this.setState({
|
||||
searchResults: { groups: groupMatches, ships: shipMatches }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user