Skip to content

Commit

Permalink
docs: fix type for form action example (#10693)
Browse files Browse the repository at this point in the history
Co-authored-by: RBengtson <[email protected]>
Co-authored-by: Willow (GHOST) <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2023
1 parent cac42de commit 30c7770
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions documentation/docs/20-core-concepts/30-form-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,11 @@ We can also implement progressive enhancement ourselves, without `use:enhance`,
/** @type {any} */
let error;
/** @param {{ currentTarget: EventTarget & HTMLFormElement}} event */
async function handleSubmit(event) {
const data = new FormData(this);
const data = new FormData(event.currentTarget);
const response = await fetch(this.action, {
const response = await fetch(event.currentTarget.action, {
method: 'POST',
body: data
});
Expand Down

0 comments on commit 30c7770

Please sign in to comment.