bug fix in add_macros
This commit is contained in:
@@ -390,11 +390,14 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
add_new_macro: async function () {
|
||||
const length = this.state.macros.length;
|
||||
let length = this.state.macros.length;
|
||||
if (length >= 20) {
|
||||
this.maxLimitReached = true;
|
||||
return;
|
||||
}
|
||||
while (this.state.macros.find(item => item.name == `Macro ${length + 1}`)) {
|
||||
length++;
|
||||
}
|
||||
const newMacros = {
|
||||
name: `Macro ${length + 1}`,
|
||||
color: "#dedede",
|
||||
|
||||
Reference in New Issue
Block a user