fix top on search page

This commit is contained in:
zeppi 2021-10-20 12:47:58 -04:00 committed by jessopb
parent 9cc8ccac4e
commit e55cae9496

View file

@ -29,10 +29,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) {