Bug: Form submission crashes when input has name="attributes" with View Transitions enabled (ClientRouter) #13307
Labels
- P2: has workaround
Bug, but has workaround (priority)
feat: view transitions
Related to the View Transitions feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When a form, using POST, with an input with name="attributes" is submitted, it crashes.
Minimal example:
This is the error that appears on the browser console:
It crashes on this line:
astro/packages/astro/src/transitions/router.ts
Line 401 in 4cb3377
If I add an optional chaining, it works (
form?.attributes.?getNamedItem(...
).This type casting is wrong, in this error the type is
HTMLInputElement
:astro/packages/astro/src/transitions/router.ts
Line 390 in 4cb3377
What's the expected result?
It should submit the form as normal.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-o2g5gcyc?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: