Skip to content

Commit

Permalink
fix: correctly check for the presence of a submitter
Browse files Browse the repository at this point in the history
  • Loading branch information
airjp73 committed Jul 8, 2024
1 parent 8498fa8 commit 2c7f3c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/react/src/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,9 @@ export const makeBaseReactFormApi = <FormInputData,>({
const nativeEvent = event.nativeEvent as HTMLSubmitEvent["nativeEvent"];
const submitter = nativeEvent.submitter as HTMLFormSubmitter | null;

const submitterData =
submitter?.name != null
? { [submitter.name]: submitter.value }
: undefined;
const submitterData = submitter?.name
? { [submitter.name]: submitter.value }
: undefined;

// Don't include option at all if the aren't provided
const submitterOptions: SubmitterOptions = {};
Expand Down

0 comments on commit 2c7f3c5

Please sign in to comment.