diff --git a/src/components/link.jsx b/src/components/link.jsx index ce82fec..a77faf0 100644 --- a/src/components/link.jsx +++ b/src/components/link.jsx @@ -21,7 +21,7 @@ const Link = forwardRef((props, ref) => { const { to, ...restProps } = props; // Handle encodeURIComponent of searchParams values - if (!!hash && hash !== '/') { + if (!!hash && hash !== '/' && hash.includes('?')) { const parsedHash = new URL(hash, location.origin); // Fake base URL if (parsedHash.searchParams.size) { const searchParamsStr = Array.from(parsedHash.searchParams.entries())