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}`;
|
const uriFromQuery = `lbry://${modifiedUrlQuery}`;
|
||||||
|
|
||||||
let streamName;
|
let streamName;
|
||||||
|
let channelName;
|
||||||
let isValid = true;
|
let isValid = true;
|
||||||
try {
|
try {
|
||||||
({ streamName } = parseURI(uriFromQuery));
|
({ streamName, channelName } = parseURI(uriFromQuery));
|
||||||
if (!streamName || !isNameValid(streamName)) {
|
if (
|
||||||
|
(!streamName && !channelName) ||
|
||||||
|
(streamName && !isNameValid(streamName)) ||
|
||||||
|
(channelName && !isNameValid(channelName))
|
||||||
|
) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in a new issue