Skip to content

Commit

Permalink
close #8653 when useFormContext provide no generic for type check
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Jul 8, 2022
1 parent 5c891c2 commit 2853f0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useFormContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const HookFormContext = React.createContext<UseFormReturn | null>(null);
* ```
*/
export const useFormContext = <
TFieldValues extends FieldValues,
TFieldValues extends FieldValues = FieldValues,
>(): UseFormReturn<TFieldValues> =>
React.useContext(HookFormContext) as unknown as UseFormReturn<TFieldValues>;

Expand Down

0 comments on commit 2853f0f

Please sign in to comment.