remix-validated-form 4.6.10 → 4.6.11
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/dist/index.cjs.js +3 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/internal/hooks.ts +4 -1
package/package.json
CHANGED
package/src/internal/hooks.ts
CHANGED
@@ -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(
|
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
|
|