Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit fb389ab

Browse files
committed
fix Ensure useFormContext always returns a valid context
1 parent 9acff4b commit fb389ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useFormContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export const useFormContext = <
66
T extends Record<string, any> = Record<string, any>,
77
>(
88
key: InjectionKey = defaultInjectionKey
9-
) => inject<FormHandlerReturn<T>>(key)
9+
) => inject<FormHandlerReturn<T>>(key) as FormHandlerReturn<T>

0 commit comments

Comments
 (0)