From 886d78bde8f4bd992f0c9fbca1495fae8a739b31 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 9 Sep 2023 17:20:31 +0800 Subject: [PATCH] Additional ? check --- src/components/link.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())