From 5e2349e80e9cba912108c5dbad5d251083f45d4f Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Wed, 9 Aug 2023 12:10:31 -0700 Subject: [PATCH] Use copy of set in addAll --- src/core/graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/graph.ts b/src/core/graph.ts index 60f397698..be915dde2 100644 --- a/src/core/graph.ts +++ b/src/core/graph.ts @@ -36,7 +36,7 @@ export class PrecedenceGraph { } } } else { - this.adjacencyMap.set(k, v); + this.adjacencyMap.set(k, new Set(v)); this.numberOfEdges += v.size; } }