Fix top search for channels (#104)
This commit is contained in:
parent
c782f73f30
commit
dcd00c2308
1 changed files with 7 additions and 2 deletions
|
@ -31,10 +31,15 @@ export default function SearchPage(props: Props) {
|
|||
const uriFromQuery = `lbry://${modifiedUrlQuery}`;
|
||||
|
||||
let streamName;
|
||||
let channelName;
|
||||
let isValid = true;
|
||||
try {
|
||||
({ streamName } = parseURI(uriFromQuery));
|
||||
if (!streamName || !isNameValid(streamName)) {
|
||||
({ streamName, channelName } = parseURI(uriFromQuery));
|
||||
if (
|
||||
(!streamName && !channelName) ||
|
||||
(streamName && !isNameValid(streamName)) ||
|
||||
(channelName && !isNameValid(channelName))
|
||||
) {
|
||||
isValid = false;
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue