From 5a72ad204b3cd028ef64cef7d25b0a8e972f5a0b Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 12 Aug 2024 20:11:51 -0400 Subject: [PATCH] fix unexpected flatten error --- src/geo/polygons.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/geo/polygons.js b/src/geo/polygons.js index 2b61d41d..4bfd8d02 100644 --- a/src/geo/polygons.js +++ b/src/geo/polygons.js @@ -323,7 +323,8 @@ function setContains(setA, poly) { return false; } -function flatten(polys, to = [], crush) { +function flatten(polys, to, crush) { + to = to || []; for (let poly of polys) { poly.flattenTo(to); if (crush) poly.inner = null;