bug fix in save macros

This commit is contained in:
sanjayk03-dev
2024-04-10 09:08:00 +05:30
parent 75d2342e41
commit 07692153d5
2 changed files with 6 additions and 6 deletions

View File

@@ -224,7 +224,6 @@ module.exports = {
},
save_macro: async function () {
if (this.tab == 0 || !this.state.macros[this.tab - 1]) {
this.load_macro();
this.confirmSave = false;
return;
}
@@ -323,10 +322,11 @@ module.exports = {
this.deleteGCode = false;
},
load_macro: async function () {
if (this.tab == 0) {
if (this.tab == 0 || !this.state.macros[this.tab - 1]) {
document.getElementById("macros-name").value = "";
document.getElementById("macros-color").value = "#ffffff";
this.isChecked = true;
this.tab = "0";
this.fileName = "default";
this.newGcode = "";
} else {