From 5fd89c26001eb8b2e02f8173bebe96d1f18e5d34 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 16 Jan 2021 02:25:16 +0100 Subject: [PATCH] bugfix: gcode_position unknown fixed in StatusPanel.vue Signed-off-by: Stefan Dej --- src/components/panels/StatusPanel.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/panels/StatusPanel.vue b/src/components/panels/StatusPanel.vue index 06eb4ae0..39303de4 100644 --- a/src/components/panels/StatusPanel.vue +++ b/src/components/panels/StatusPanel.vue @@ -129,7 +129,7 @@ - G-Code: {{ gcode_position[2].toFixed(2) }}mm + G-Code: {{ gcode_position[2].toFixed(2) }}mm @@ -271,6 +271,7 @@ if ( 'first_layer_height' in this.current_file && 'layer_height' in this.current_file && + this.gcode_position !== undefined && this.gcode_position.length >= 3 ) { const current_layer = Math.ceil((this.gcode_position[2] - this.current_file.first_layer_height) / this.current_file.layer_height + 1)