From e1e9263dd2ceb1ee579d3dbf67a0bc889dad6895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=A1ez?= Date: Sat, 19 Oct 2024 13:09:34 -0300 Subject: [PATCH] fix: can't do getTilePathfrom 0,0 (#419) --- 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 14be33aa..72e4580e 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"); }