remix-validated-form 4.6.9 → 4.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remix-validated-form",
3
- "version": "4.6.9",
3
+ "version": "4.6.10",
4
4
  "description": "Form component and utils for easy form validation in remix",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -321,7 +321,7 @@ export function ValidatedForm<DataType>({
321
321
  startSubmit();
322
322
  const submitter = nativeEvent.submitter as HTMLFormSubmitter | null;
323
323
  const formMethod = (submitter?.formMethod as FormMethod) || method;
324
- const formDataToValidate = getDataFromForm(e.currentTarget);
324
+ const formDataToValidate = getDataFromForm(target);
325
325
  if (submitter?.name) {
326
326
  formDataToValidate.append(submitter.name, submitter.value);
327
327
  }
@@ -351,8 +351,7 @@ export function ValidatedForm<DataType>({
351
351
  // but we already have the form in `formRef.current` so we can just use that.
352
352
  // If we use `event.currentTarget` here, it will break because `currentTarget`
353
353
  // will have changed since the start of the submission.
354
- if (fetcher)
355
- fetcher.submit(submitter || e.currentTarget, { method: formMethod });
354
+ if (fetcher) fetcher.submit(submitter || target, { method: formMethod });
356
355
  else
357
356
  submit(submitter || target, {
358
357
  replace,