From cbdf31c820c994f0e4b2c13ab2108dae2f53cf08 Mon Sep 17 00:00:00 2001 From: tjtanjin Date: Thu, 14 Nov 2024 01:25:40 +0800 Subject: [PATCH] fix: Fix undefined flow ref not caught --- src/hooks/internal/useFlowInternal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/internal/useFlowInternal.ts b/src/hooks/internal/useFlowInternal.ts index 5c8b46b..bec3236 100644 --- a/src/hooks/internal/useFlowInternal.ts +++ b/src/hooks/internal/useFlowInternal.ts @@ -38,7 +38,7 @@ export const useFlowInternal = () => { * Retrieves the conversation flow for the chatbot. */ const getFlow = useCallback(() => { - return flowRef.current ?? {}; + return flowRef?.current ?? {}; }, [flowRef]);