Skip to content

Commit 74e5330

Browse files
committed
Cleaned up code
1 parent 319f650 commit 74e5330

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/src/isomorphic/core/hooks/use-form

src/src/isomorphic/core/hooks/use-form/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function useForm<SchemaType extends ZodObject>({
3535

3636
const handleSubmit = useCallback(
3737
async (values: UseFormValues<SchemaType>) => {
38-
if (!onSubmit) return;
38+
if (submitting || !onSubmit) return;
3939

4040
setSubmitting(true);
4141

@@ -58,6 +58,7 @@ export function useForm<SchemaType extends ZodObject>({
5858
form.setInitialValues,
5959
localization.localize,
6060
onSubmit,
61+
submitting,
6162
],
6263
);
6364

0 commit comments

Comments
 (0)