From aa7455effa3bbb8e0d9d0722c6167a49f6f8fe08 Mon Sep 17 00:00:00 2001 From: Tim Schottler Date: Wed, 13 Oct 2021 18:40:12 -0500 Subject: [PATCH 1/2] fix bug with smoothing when path is blocked --- src/core/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Util.js b/src/core/Util.js index 3e35956b..a26543e5 100644 --- a/src/core/Util.js +++ b/src/core/Util.js @@ -164,7 +164,7 @@ function smoothenPath(grid, path) { } } if (blocked) { - lastValidCoord = path[i - 1]; + let lastValidCoord = path[i - 1]; newPath.push(lastValidCoord); sx = lastValidCoord[0]; sy = lastValidCoord[1]; From e14bea080fdd9fa486737cc9850cc90e004226f4 Mon Sep 17 00:00:00 2001 From: Tim Schottler Date: Wed, 13 Oct 2021 18:42:59 -0500 Subject: [PATCH 2/2] let -> var to be consistent with rest of file --- src/core/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Util.js b/src/core/Util.js index a26543e5..f687156d 100644 --- a/src/core/Util.js +++ b/src/core/Util.js @@ -164,7 +164,7 @@ function smoothenPath(grid, path) { } } if (blocked) { - let lastValidCoord = path[i - 1]; + var lastValidCoord = path[i - 1]; newPath.push(lastValidCoord); sx = lastValidCoord[0]; sy = lastValidCoord[1];