From e708ebe882b7278f433fef31c7e8845098d1ac0f Mon Sep 17 00:00:00 2001 From: harlan Date: Wed, 16 Oct 2024 11:53:38 +1100 Subject: [PATCH] fix: respect query strings Fixes #207 --- packages/core/src/router/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/router/util.ts b/packages/core/src/router/util.ts index 7b267d30..3690013d 100644 --- a/packages/core/src/router/util.ts +++ b/packages/core/src/router/util.ts @@ -34,10 +34,10 @@ export function normaliseRoute(url: string): NormalisedRoute { const $url = new URL(url) // make sure we start with a leading slash - const path = withLeadingSlash($url.pathname) + const path = `${withLeadingSlash($url.pathname)}${$url.search}` let normalised: Partial = { - id: hashPathName(path), + id: hashPathName(`${$url.pathname}${$url.search}`), url, $url, path,