Skip to content

Commit 2d81559

Browse files
committed
Clarified submit method.
1 parent 8e1b308 commit 2d81559

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- `get` and `set` accessor for `onChange`.
13-
- `submit` method for `superForm`, a convenience instead of using [requestSubmit](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit). Requires `use:enhance` or that a `HTMLElement` inside the form is passed as an argument.
13+
- `submit` method for `superForm`, a convenience instead of using [requestSubmit](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit). Requires `use:enhance` or that a `HTMLElement` inside the form (or the form itself) is passed as an argument.
1414

1515
### Fixed
1616

src/lib/client/superForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ export function superForm<
14581458

14591459
if (!form) {
14601460
throw new SuperFormError(
1461-
'use:enhance must be added to the form to use submit, or pass a HTMLElement inside the form as an argument.'
1461+
'use:enhance must be added to the form to use submit, or pass a HTMLElement inside the form (or the form itself) as an argument.'
14621462
);
14631463
}
14641464

0 commit comments

Comments
 (0)