don't decode search params because they might contain lbry urls
This commit is contained in:
parent
10914e5350
commit
8db4622c3a
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ function AppRouter(props: Props) {
|
||||||
// react-router doesn't decode pathanmes before doing the route matching check
|
// 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
|
// We have to redirect here because if we redirect on the server, it might get encoded again
|
||||||
// in the browser causing a redirect loop
|
// in the browser causing a redirect loop
|
||||||
const decodedUrl = decodeURIComponent(pathname + search);
|
const decodedUrl = decodeURIComponent(pathname) + search;
|
||||||
if (decodedUrl !== pathname + search) {
|
if (decodedUrl !== pathname + search) {
|
||||||
return <Redirect to={decodedUrl} />;
|
return <Redirect to={decodedUrl} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue