Skip to content

Commit beaf293

Browse files
committed
Update loaction on GET submissions too
1 parent 9a25287 commit beaf293

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

packages/router/src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ export class Router<Renderable> extends EventTarget {
333333

334334
// Update outlet with the result
335335
this.#outlet = result;
336-
// Only update location for GET requests (navigation)
336+
// Only update location for GET requests (navigation and GET form submissions)
337337
// For non-GET requests (mutations), keep the current location
338-
if (!submission) {
338+
if (!submission || submission.formMethod === "GET") {
339339
this.#location = location;
340340
}
341341

pnpm-lock.yaml

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)