🐛 fix(inputListComponent): handle conversion from string to array for value prop to ensure smooth operation and prevent potential errors

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-11 14:23:35 -03:00
commit 327cb0771f

View file

@ -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 (
<div