Skip to content

Commit

Permalink
prevent default event in settings check
Browse files Browse the repository at this point in the history
  • Loading branch information
RheingoldRiver committed Oct 29, 2023
1 parent e7d660d commit 20ac3fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export const Settings = () => {
onOpenChange={setOpen}
>
<form
onSubmit={() => {
onSubmit={(e) => {
e.preventDefault();
setShowErrors(true);
let returnEarly = false;
if (errorConfig(currentState)) returnEarly = true;
Expand All @@ -108,7 +109,6 @@ export const Settings = () => {
);
}
}
console.log(`return early: ${returnEarly}`);
if (returnEarly) return;

// done with validation
Expand Down

0 comments on commit 20ac3fb

Please sign in to comment.