From fb389abaccfdc58fa410f39040788cb3ce9ae8d7 Mon Sep 17 00:00:00 2001 From: mj Date: Fri, 14 Jun 2024 00:04:57 +0900 Subject: [PATCH] fix Ensure useFormContext always returns a valid context --- src/useFormContext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useFormContext.ts b/src/useFormContext.ts index 3f456ed..d111251 100644 --- a/src/useFormContext.ts +++ b/src/useFormContext.ts @@ -6,4 +6,4 @@ export const useFormContext = < T extends Record = Record, >( key: InjectionKey = defaultInjectionKey -) => inject>(key) +) => inject>(key) as FormHandlerReturn