Skip to content

Commit 098dccb

Browse files
committed
fix #474 improper search parameter resolution while routing
1 parent ae863d4 commit 098dccb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rich-wasps-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
fix #474 improper search parameter resolution while routing

src/routing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export function createRouterContext(
417417
let s: string;
418418
const resolvedTo = resolve
419419
? route.resolvePath(to)
420-
: resolvePath((queryOnly && (s = source().value) && s.split("?")[0]) || "", to);
420+
: resolvePath((queryOnly && location.pathname) || "", to);
421421

422422
if (resolvedTo === undefined) {
423423
throw new Error(`Path '${to}' is not a routable path`);

0 commit comments

Comments
 (0)