From 327cb0771f6e8d3ac7478ecd5aa505ac08f7baec Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 11 Sep 2023 14:23:35 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(inputListComponent):=20handl?= =?UTF-8?q?e=20conversion=20from=20string=20to=20array=20for=20value=20pro?= =?UTF-8?q?p=20to=20ensure=20smooth=20operation=20and=20prevent=20potentia?= =?UTF-8?q?l=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/inputListComponent/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index a1f58789f..f415e4dbb 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -19,7 +19,9 @@ export default function InputListComponent({ }, [disabled]); // @TODO Recursive Character Text Splitter - the value might be in string format, whereas the InputListComponent specifically requires an array format. To ensure smooth operation and prevent potential errors, it's crucial that we handle the conversion from a string to an array with the string as its element. - typeof value === 'string' ? value = [value] : value = value; + if (typeof value === "string") { + value = [value]; + } return (