From 33225af265702609b42c652a493a0fae472e7647 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 25 Jul 2021 13:32:31 -0400 Subject: [PATCH] fix empty slices errors --- src/mode/fdm/slice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index b4e39e5e..d69ed988 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -246,7 +246,7 @@ widget.slices = slices; - if (!slices) { + if (!slices || slices.length === 0) { return; } @@ -370,7 +370,7 @@ } } // ensure we start against a layer with shells - while (start.up && start.topShells().length === 0) { + while (start && start.up && start.topShells().length === 0) { start = start.up; } // if a brim applies, add that width to anchor