fix in delete selected macro

This commit is contained in:
sanjayk03-dev
2024-04-08 23:31:55 +05:30
parent 06fadd1c3f
commit 885f2130bf
2 changed files with 3 additions and 2 deletions

View File

@@ -419,11 +419,12 @@ module.exports = {
delete_selected_macro: async function () {
if (this.tab == 0) {
this.clear_macro();
this.deleteSelected = false;
return;
}
this.config.macros = [...this.state.macros];
this.config.macros.splice(this.tab - 1, 1);
this.tab = this.state.macros.length - 1;
this.tab--;
this.clear_macro();
try {
await api.put("config/save", this.config);