Skip to content

Commit b3c9595

Browse files
lhstrhbyeonggiljun
andauthored
Update src/core/graph.ts
Co-authored-by: Byeong-gil Jun <[email protected]>
1 parent 2243ed7 commit b3c9595

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/graph.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ export class SortablePrecedenceGraph<
397397
} else {
398398
// Look further upstream for start nodes that match the type.
399399
for (const newStartNode of pg.getDownstreamNeighbors(node)) {
400-
startNodes.add(newStartNode);
400+
if (!visited.has(newStartNode)) {
401+
startNodes.add(newStartNode);
402+
}
401403
}
402404
}
403405
}

0 commit comments

Comments
 (0)