diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index e7d996f0a..fb77f168e 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -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) => {