Skip to content

Commit 589d2de

Browse files
authored
Merge pull request #74 from minai621/fix/73-ensure-use-form-context-validity
fix Ensure useFormContext always returns a valid context
2 parents 9acff4b + fb389ab commit 589d2de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useFormContext.ts

+1-1
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)