From c2c7da75f2fdf2a54b854b07532eb11a98bf5bd7 Mon Sep 17 00:00:00 2001 From: Robby6Strings Date: Thu, 20 Jun 2024 10:14:37 +1200 Subject: [PATCH] bugfix: queueing node for update that contains future tree-in-progress now replaces that tree with itself --- packages/lib/src/scheduler.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/lib/src/scheduler.ts b/packages/lib/src/scheduler.ts index 37464b95..a0d0e208 100644 --- a/packages/lib/src/scheduler.ts +++ b/packages/lib/src/scheduler.ts @@ -113,6 +113,9 @@ export class Scheduler { this.currentTreeIndex-- this.treesInProgress.splice(i, 1) this.treesInProgress.push(node) + } else { + // node contains a tree that has not yet been processed, 'usurp' the tree + this.treesInProgress.splice(i, 1, node) } return }