Correctly navigate to channel URL

This commit is contained in:
ioancole 2020-09-11 23:56:30 +08:00 committed by Sean Yesmunt
parent 7f00a01c2b
commit 9d51cee72c

View file

@ -50,10 +50,10 @@ export default function SearchPage(props: Props) {
}
const INVALID_URI_CHARS = new RegExp(regexInvalidURI, 'gu');
let path;
let path, streamName;
let isValid = true;
try {
let { streamName } = parseURI(urlQuery.replace(/ /g, '-').replace(/:/g, '#'));
({ path, streamName } = parseURI(urlQuery.replace(/ /g, '-').replace(/:/g, '#')));
if (!isNameValid(streamName)) {
isValid = false;
}