diff --git a/pkg/interface/publish/src/js/components/lib/invite-search.js b/pkg/interface/publish/src/js/components/lib/invite-search.js index f1408753e5..2678e04ed3 100644 --- a/pkg/interface/publish/src/js/components/lib/invite-search.js +++ b/pkg/interface/publish/src/js/components/lib/invite-search.js @@ -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 } + }) + } } }