fixes #53 b/c uglify optimization confuses chrome boolean expression evaluation

This commit is contained in:
Stewart Allen 2018-11-20 10:02:31 -05:00
commit 9e6508e4f6

View file

@ -385,8 +385,11 @@ var gs_kiri_print = exports;
*/ */
function addOutput(array, point, emit, speed, tool) { function addOutput(array, point, emit, speed, tool) {
// drop duplicates (usually intruced by FDM bisections) // drop duplicates (usually intruced by FDM bisections)
if (lastPoint && point && point.x == lastPoint.x && point.y == lastPoint.y && point.z == lastPoint.z && lastEmit == emit) { if (lastPoint && point) {
return; // nested due to uglify confusing browser
if (point.x == lastPoint.x && point.y == lastPoint.y && point.z == lastPoint.z && lastEmit == emit) {
return;
}
} }
lastPoint = point; lastPoint = point;
lastEmit = emit; lastEmit = emit;