Bugfix - InputListComponent expect an array as Input() (#830)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-29 20:25:28 +00:00 • committed by GitHub
commit 8f27c71553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,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;
return (
<div
className={classNames(