diff --git a/airflow/www/static/js/dag_dependencies.js b/airflow/www/static/js/dag_dependencies.js index 4e342288efcd9..81ba457522b54 100644 --- a/airflow/www/static/js/dag_dependencies.js +++ b/airflow/www/static/js/dag_dependencies.js @@ -198,8 +198,14 @@ const renderGraph = () => { g.setNode(node.id, node.value); }); + // filter out edges that point to non-existent nodes + const realEdges = edges.filter((e) => { + const edgeNodes = nodes.filter((n) => n.id === e.u || n.id === e.v); + return edgeNodes.length === 2; + }); + // Set edges - edges.forEach((edge) => { + realEdges.forEach((edge) => { g.setEdge(edge.u, edge.v, { curve: d3.curveBasis, arrowheadClass: 'arrowhead',