diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 737e948db..433ced9c0 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -471,7 +471,11 @@ Array<{ id: string; errors: Array }> { ]; } // validateNode(n, edges) returns an array of errors for the node - return nodes.map((n) => ({ id: n.id, errors: validateNode(n, edges) })); + const nodeMap = nodes.map((n) => ({ + id: n.id, + errors: validateNode(n, edges), + })); + return nodeMap.filter((n) => n.errors?.length); } export function updateEdges(edges: Edge[]) {