From 2c7f3c5101e33c201054abb5af5ccb025e647552 Mon Sep 17 00:00:00 2001 From: Aaron Pettengill Date: Mon, 8 Jul 2024 16:31:42 -0400 Subject: [PATCH] fix: correctly check for the presence of a submitter --- packages/react/src/base.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react/src/base.tsx b/packages/react/src/base.tsx index b13fe6ef..817881b5 100644 --- a/packages/react/src/base.tsx +++ b/packages/react/src/base.tsx @@ -541,10 +541,9 @@ export const makeBaseReactFormApi = ({ 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 = {};