fix null end layer bug

This commit is contained in:
Stewart Allen 2018-01-20 22:51:35 -05:00
commit 7e2d6bc060
4 changed files with 7 additions and 4 deletions

View file

@ -357,7 +357,7 @@ var gs_kiri_fdm = exports;
layer++;
update(layer / maxLayers);
// retract after last layer
if (layer === maxLayers) {
if (layer === maxLayers && layerout.length) {
layerout.last().retract = true;
}