From 512419c131dd563be9cd0506c734373e2a33b963 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Thu, 1 Jan 2026 20:52:17 +0800 Subject: [PATCH] fix: Cannot set properties of undefined (setting 'open') in opening ChatFragmentDialog --- client/ui/app-state/AppStateContextWrapper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ui/app-state/AppStateContextWrapper.tsx b/client/ui/app-state/AppStateContextWrapper.tsx index 0bbd17c..df28273 100644 --- a/client/ui/app-state/AppStateContextWrapper.tsx +++ b/client/ui/app-state/AppStateContextWrapper.tsx @@ -73,7 +73,8 @@ export default function DialogContextWrapper({ children, useRef }: { children: R setUseChatFragmentDialog(inDialog || false) setUserOrChatInfoDialogState([]) setCurrentSelectedChatId(chat) - chatFragmentDialogRef.current!.open = true + + useChatFragmentDialog && (chatFragmentDialogRef.current!.open = true) } static closeChat() { if (chatFragmentDialogRef.current!.open) {