Fixed if/else that is not on useEffect

This commit is contained in:
Lucas Oliveira 2024-06-13 16:43:38 -03:00 committed by ogabrielluiz
commit 7ceaefd651

View file

@ -220,10 +220,11 @@ export default function ParameterComponent({
);
}
// If optionalHandle is an empty list, then it is not an optional handle
if (optionalHandle && optionalHandle.length === 0) {
optionalHandle = null;
}
useEffect(() => {
if (optionalHandle && optionalHandle.length === 0) {
optionalHandle = null;
}
}, [optionalHandle]);
const handleUpdateOutputHide = (value?: boolean) => {
setNode(data.id, (oldNode) => {