Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hot-brooms-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fix TypeError when a GET form uses a relative `formaction` attribute with ClientRouter enabled
2 changes: 1 addition & 1 deletion packages/astro/components/ClientRouter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const { fallback = 'animate' } = Astro.props;
const options: Options = { sourceElement: submitter ?? form };
if (method === 'get') {
const params = new URLSearchParams(formData as any);
const url = new URL(action);
const url = new URL(action, location.href);
url.search = params.toString();
action = url.toString();
} else {
Expand Down
Loading