From 59b7e593033e20e8c2af507f4fcce1c637260da4 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 25 Jan 2022 21:59:17 -0500 Subject: [PATCH] fix misguided attempt to simplify emit --- src/kiri/slicer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kiri/slicer.js b/src/kiri/slicer.js index 78164a1f..3272b799 100644 --- a/src/kiri/slicer.js +++ b/src/kiri/slicer.js @@ -631,7 +631,7 @@ let npath = flat[0]; for (let p of npath) p.del = true; // if (debug) console.log({root, branches, flat, path, npath}); - return emitPath(root ? npath : path); + return root ? npath : path; } else { // dangling end path.open = point.group.length <= 1; @@ -641,7 +641,7 @@ // hit an open end or branch if (!point || point.del) { - return emitPath(path); + return path; } } } @@ -688,7 +688,8 @@ for (let point of points) { // must not have been used and be a dangling end if (!point.del && point.group.length) { - findNextPath(point); + let path = findNextPath(point); + if (path) emitPath(path); } }