GCODE Viewer: Fix issue with lookup of layer index 0
We were just testing if z_heights[z] was truthy. If the layer index was set but 0 that wasn't properly detected and let to overwriting our layer information. Instead check explicitly against undefined. Closes #2017
This commit is contained in:
parent
e06c09e206
commit
0456896d71
1 changed files with 1 additions and 1 deletions
|
|
@ -545,7 +545,7 @@ var doParse = function () {
|
|||
}
|
||||
|
||||
if (typeof(z) !== 'undefined' && z !== prevZ) {
|
||||
if (z_heights[z]) {
|
||||
if (z_heights[z] !== undefined) {
|
||||
layer = z_heights[z];
|
||||
} else {
|
||||
layer = model.length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue