Skip to content

Commit e708ebe

Browse files
committed
fix: respect query strings
Fixes #207
1 parent bc1ccfa commit e708ebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/router/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export function normaliseRoute(url: string): NormalisedRoute {
3434

3535
const $url = new URL(url)
3636
// make sure we start with a leading slash
37-
const path = withLeadingSlash($url.pathname)
37+
const path = `${withLeadingSlash($url.pathname)}${$url.search}`
3838

3939
let normalised: Partial<NormalisedRoute> = {
40-
id: hashPathName(path),
40+
id: hashPathName(`${$url.pathname}${$url.search}`),
4141
url,
4242
$url,
4343
path,

0 commit comments

Comments
 (0)