From f704589384f1fe216aa9e27735a3e09e5af89f19 Mon Sep 17 00:00:00 2001 From: DoiMayank Date: Sun, 22 Sep 2024 01:35:25 +0530 Subject: [PATCH 1/2] Fix: Coerce string coordinates to numbers in boundsPoint function --- src/path/bounds.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/path/bounds.js b/src/path/bounds.js index 0c83258..31a6c16 100644 --- a/src/path/bounds.js +++ b/src/path/bounds.js @@ -19,6 +19,8 @@ var boundsStream = { }; function boundsPoint(x, y) { + x = +x; // Coerce x to a number + y = +y; // Coerce y to a number if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y; From 7e8cf5efb1782a3a7cdb86889d6183599780daa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Sun, 22 Sep 2024 17:03:36 +0200 Subject: [PATCH 2/2] Update src/path/bounds.js --- src/path/bounds.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/bounds.js b/src/path/bounds.js index 31a6c16..f079562 100644 --- a/src/path/bounds.js +++ b/src/path/bounds.js @@ -19,8 +19,8 @@ var boundsStream = { }; function boundsPoint(x, y) { - x = +x; // Coerce x to a number - y = +y; // Coerce y to a number + x = +x; + y = +y; if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y;