From 7abe73f038c05e057652863201e337527c285e0c Mon Sep 17 00:00:00 2001 From: Eric Xu Date: Wed, 10 Jul 2024 15:09:23 -0400 Subject: [PATCH] Reduce async inconsistency --- src/lib/MazeController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/MazeController.ts b/src/lib/MazeController.ts index f0d1584..e169829 100644 --- a/src/lib/MazeController.ts +++ b/src/lib/MazeController.ts @@ -143,6 +143,7 @@ export class MazeController { this.drawer.shouldDraw = settings.doAnimateGenerating; this.mazeAnimation = animation; this.mazeAnimation.start(); + this.shouldSweep = true; this.mazeAnimation.promise.then(() => { this.mazeAnimation = null; this.drawer.isComplete = true; @@ -152,7 +153,6 @@ export class MazeController { if (!settings.doAnimateGenerating) this.drawer.animateCanvasCopyFill(); this.drawer.useHiddenCtx = false; }); - this.shouldSweep = true; }); }