remix-validated-form 4.6.9 → 4.6.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,18 @@
1
- $ tsup
2
- CLI Building entry: src/index.ts
3
- CLI Using tsconfig: tsconfig.json
4
- CLI tsup v6.5.0
5
- CLI Using tsup config: /Users/aaronpettengill/dev/remix-validated-form/packages/remix-validated-form/tsup.config.ts
6
- CLI Target: es2019
7
- CLI Cleaning output folder
8
- ESM Build start
9
- CJS Build start
10
- ESM dist/index.esm.js 56.19 KB
11
- ESM dist/index.esm.js.map 120.98 KB
12
- ESM ⚡️ Build success in 26ms
13
- CJS dist/index.cjs.js 58.82 KB
14
- CJS dist/index.cjs.js.map 121.12 KB
15
- CJS ⚡️ Build success in 26ms
16
- DTS Build start
17
- DTS ⚡️ Build success in 1562ms
18
- DTS dist/index.d.ts 11.67 KB
1
+ $ tsup
2
+ CLI Building entry: src/index.ts
3
+ CLI Using tsconfig: tsconfig.json
4
+ CLI tsup v6.5.0
5
+ CLI Using tsup config: /Users/aaronpettengill/dev/remix-validated-form/packages/remix-validated-form/tsup.config.ts
6
+ CLI Target: es2019
7
+ CLI Cleaning output folder
8
+ ESM Build start
9
+ CJS Build start
10
+ ESM dist/index.esm.js 56.25 KB
11
+ ESM dist/index.esm.js.map 121.08 KB
12
+ ESM ⚡️ Build success in 27ms
13
+ CJS dist/index.cjs.js 58.87 KB
14
+ CJS dist/index.cjs.js.map 121.22 KB
15
+ CJS ⚡️ Build success in 26ms
16
+ DTS Build start
17
+ DTS ⚡️ Build success in 1588ms
18
+ DTS dist/index.d.ts 11.67 KB
package/dist/index.cjs.js CHANGED
@@ -1073,7 +1073,9 @@ var useDefaultValuesFromLoader = ({
1073
1073
  const matches = (0, import_react2.useMatches)();
1074
1074
  if (typeof formId === "string") {
1075
1075
  const dataKey = formDefaultValuesKey(formId);
1076
- const match = matches.reverse().find((match2) => match2.data && dataKey in match2.data);
1076
+ const match = matches.reverse().find(
1077
+ (match2) => match2.data && typeof match2.data === "object" && dataKey in match2.data
1078
+ );
1077
1079
  return match == null ? void 0 : match.data[dataKey];
1078
1080
  }
1079
1081
  return null;
@@ -1585,7 +1587,7 @@ function ValidatedForm({
1585
1587
  startSubmit();
1586
1588
  const submitter = nativeEvent.submitter;
1587
1589
  const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
1588
- const formDataToValidate = getDataFromForm(e.currentTarget);
1590
+ const formDataToValidate = getDataFromForm(target);
1589
1591
  if (submitter == null ? void 0 : submitter.name) {
1590
1592
  formDataToValidate.append(submitter.name, submitter.value);
1591
1593
  }
@@ -1609,7 +1611,7 @@ function ValidatedForm({
1609
1611
  return;
1610
1612
  }
1611
1613
  if (fetcher)
1612
- fetcher.submit(submitter || e.currentTarget, { method: formMethod });
1614
+ fetcher.submit(submitter || target, { method: formMethod });
1613
1615
  else
1614
1616
  submit(submitter || target, {
1615
1617
  replace: replace2,