From b3c9595e3ca84961d86966c9ff3ddaa22cdc4b6d Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Tue, 15 Aug 2023 16:31:10 -0700 Subject: [PATCH] Update src/core/graph.ts Co-authored-by: Byeong-gil Jun <78055940+byeong-gil@users.noreply.github.com> --- src/core/graph.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/graph.ts b/src/core/graph.ts index db2190e1..3a3a72ae 100644 --- a/src/core/graph.ts +++ b/src/core/graph.ts @@ -397,7 +397,9 @@ export class SortablePrecedenceGraph< } else { // Look further upstream for start nodes that match the type. for (const newStartNode of pg.getDownstreamNeighbors(node)) { - startNodes.add(newStartNode); + if (!visited.has(newStartNode)) { + startNodes.add(newStartNode); + } } } }