don't decode search params because they might contain lbry urls

This commit is contained in:
Sean Yesmunt 2020-03-31 16:35:33 -04:00
parent 10914e5350
commit 8db4622c3a

View file

@ -131,7 +131,7 @@ function AppRouter(props: Props) {
// react-router doesn't decode pathanmes before doing the route matching check
// We have to redirect here because if we redirect on the server, it might get encoded again
// in the browser causing a redirect loop
const decodedUrl = decodeURIComponent(pathname + search);
const decodedUrl = decodeURIComponent(pathname) + search;
if (decodedUrl !== pathname + search) {
return <Redirect to={decodedUrl} />;
}