fix bug with empty output array

This commit is contained in:
Stewart Allen 2022-01-19 19:59:44 -05:00
commit 799efce680

View file

@ -486,7 +486,7 @@
// last layer/move is to zmax
// injected into the last layer generated
if (lastPoint)
if (lastPoint && newOutput.length)
addOutput(newOutput[newOutput.length-1], printPoint = lastPoint.clone().setZ(zmax_outer), 0, 0, tool.getNumber());
// replace output single flattened layer with all points