From bd7489206da2b38052587a0f286b8bf8905f9917 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 7 Aug 2023 20:32:27 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(chatComponent):=20add=20null?= =?UTF-8?q?=20check=20for=20formKeysData.input=5Fkeys=20to=20prevent=20err?= =?UTF-8?q?or=20when=20accessing=20undefined=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/chatComponent/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index ac551f6de..2b32dc0c4 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -58,7 +58,12 @@ export default function Chat({ flow }: ChatType) { ) { setIsBuilt(false); } - if (tabsState && tabsState[flow.id] && tabsState[flow.id].formKeysData) { + if ( + tabsState && + tabsState[flow.id] && + tabsState[flow.id].formKeysData && + tabsState[flow.id].formKeysData.input_keys !== null + ) { setCanOpen(true); } else { setCanOpen(false);