remix-validated-form 4.6.10 → 4.6.11

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remix-validated-form",
3
- "version": "4.6.10",
3
+ "version": "4.6.11",
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",
@@ -67,7 +67,10 @@ export const useDefaultValuesFromLoader = ({
67
67
  // we should use the data from the deepest route.
68
68
  const match = matches
69
69
  .reverse()
70
- .find((match) => match.data && dataKey in match.data);
70
+ .find(
71
+ (match) =>
72
+ match.data && typeof match.data === "object" && dataKey in match.data
73
+ );
71
74
  return match?.data[dataKey];
72
75
  }
73
76