fix top on search page
This commit is contained in:
parent
9cc8ccac4e
commit
e55cae9496
1 changed files with 7 additions and 2 deletions
|
@ -29,10 +29,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