From 072e3979c9ccc3ac987da1cbc3acde582cfe7662 Mon Sep 17 00:00:00 2001 From: lajbel Date: Tue, 24 Sep 2024 18:12:58 -0300 Subject: [PATCH] fix: can't do getTilePathfrom 0,0 --- src/game/level.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/level.ts b/src/game/level.ts index 54020c56..34f1f3f5 100644 --- a/src/game/level.ts +++ b/src/game/level.ts @@ -590,7 +590,7 @@ export function addLevel( while (node !== start) { let cameNode = cameFrom.get(node); - if (!cameNode) { + if (cameNode === undefined) { throw new Error("Bug in pathfinding algorithm"); }