From 5dc202fc178f8232952db2c3b2a7c16950890aa2 Mon Sep 17 00:00:00 2001 From: ThaumRystra Date: Fri, 25 Jul 2025 18:27:18 +0200 Subject: [PATCH] Fix bug in dependency loop detection --- .../api/engine/computation/computeCreatureComputation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/imports/api/engine/computation/computeCreatureComputation.ts b/app/imports/api/engine/computation/computeCreatureComputation.ts index 7c9ffe08..298060b7 100644 --- a/app/imports/api/engine/computation/computeCreatureComputation.ts +++ b/app/imports/api/engine/computation/computeCreatureComputation.ts @@ -65,7 +65,7 @@ function pushDependenciesToStack(nodeId: NodeId, graph: Graph, stack: TraversedN // This is a dependency loop, find a path from the node to itself // and store that path as a dependency loop error const pather = path.nba(graph, { oriented: true }); - const loop: TraversedNode[] = []; + let loop: TraversedNode[] = []; // Pather doesn't like going from a node to itself, so find all the // paths going from the next node back to the original node // and return the shortest one