Skip to content

Commit

Permalink
Merge pull request #74 from minai621/fix/73-ensure-use-form-context-v…
Browse files Browse the repository at this point in the history
…alidity

fix Ensure useFormContext always returns a valid context
  • Loading branch information
dbssman authored Jun 22, 2024
2 parents 9acff4b + fb389ab commit 589d2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useFormContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const useFormContext = <
T extends Record<string, any> = Record<string, any>,
>(
key: InjectionKey = defaultInjectionKey
) => inject<FormHandlerReturn<T>>(key)
) => inject<FormHandlerReturn<T>>(key) as FormHandlerReturn<T>

0 comments on commit 589d2de

Please sign in to comment.