diff --git a/src/container/EdgeRenderer/index.tsx b/src/container/EdgeRenderer/index.tsx index 820546f2..9a97bb3a 100644 --- a/src/container/EdgeRenderer/index.tsx +++ b/src/container/EdgeRenderer/index.tsx @@ -127,6 +127,11 @@ function renderEdge(edge: Edge, props: EdgeRendererProps, nodes: Node[], selecte if (!targetNode) { throw new Error(`couldn't create edge for target id: ${targetId}`); } + + if (!sourceNode.__rg.width || !sourceNode.__rg.height) { + return null; + } + const edgeType = edge.type || 'default'; const EdgeComponent = props.edgeTypes[edgeType] || props.edgeTypes.default; const sourceHandle = getHandle(sourceNode.__rg.handleBounds.source, sourceHandleId);