From 7bba3fd0878e0cd6e0caeeaec38f2578bf22d28c Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 7 Jun 2023 06:25:08 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(chatModal):=20fix=20conditio?= =?UTF-8?q?nal=20statement=20to=20check=20for=20undefined=20and=20null=20v?= =?UTF-8?q?alues=20The=20conditional=20statement=20in=20line=20292=20was?= =?UTF-8?q?=20not=20properly=20checking=20for=20undefined=20and=20null=20v?= =?UTF-8?q?alues,=20which=20could=20lead=20to=20unexpected=20behavior.=20T?= =?UTF-8?q?he=20fix=20ensures=20that=20the=20statement=20checks=20for=20al?= =?UTF-8?q?l=20falsy=20values,=20including=20undefined=20and=20null.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/modals/chatModal/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx index c6a86daaf..46d62266b 100644 --- a/src/frontend/src/modals/chatModal/index.tsx +++ b/src/frontend/src/modals/chatModal/index.tsx @@ -290,7 +290,9 @@ export default function ChatModal({ errors.concat( template[t].required && template[t].show && - (!template[t].value || template[t].value === "") && + (template[t].value === undefined || + template[t].value === null || + template[t].value === "") && !reactFlowInstance .getEdges() .some(