From 1d614a09493cdd1cbc0b758f393df435fcc9781f Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 22 Feb 2024 04:56:25 +0530 Subject: [PATCH] dont save empty gcodes --- src/js/macros.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/macros.js b/src/js/macros.js index 528f1cb..0de3410 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -217,7 +217,9 @@ module.exports = { var file_name = this.fileName == "default" ? formattedFilename + ".ngc" : this.fileName; var file = this.newGcode; - this.uploadGCode(file_name, file); + if (file.trim() != "") { + this.uploadGCode(file_name, file); + } this.config.macros[this.tab - 1].name = macrosName; this.config.macros[this.tab - 1].color = macrosColor;