diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 2c94aa205..a3e3e6357 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -311,13 +311,15 @@ export default function ParameterComponent({ field_name={name} setNodeClass={(nodeClass) => { data.node = nodeClass; - cleanEdges({ - flow: { - edges: reactFlowInstance.getEdges(), - nodes: reactFlowInstance.getNodes(), - }, - updateEdge: (edge) => reactFlowInstance.setEdges(edge), - }); + if (reactFlowInstance) { + cleanEdges({ + flow: { + edges: reactFlowInstance.getEdges(), + nodes: reactFlowInstance.getNodes(), + }, + updateEdge: (edge) => reactFlowInstance.setEdges(edge), + }); + } }} nodeClass={data.node} disabled={disabled}