forked from engineering/cloudservices
Hopefully stop memory leak
parent
9b85bea477
commit
c7e036062f
|
@ -66,10 +66,14 @@ export default class Util {
|
|||
parentLabel += `${resolvedCommand.name} `;
|
||||
resolvedCommand = resolvedCommand.subcommands.get(args[0]); args.shift();
|
||||
} else {
|
||||
for (const subCmd of resolvedCommand.subcommands.toArray()) {
|
||||
const subcommandArray = resolvedCommand.subcommands.toArray();
|
||||
for (const subCmd of subcommandArray) {
|
||||
if (subCmd.aliases.includes(args[0])) {
|
||||
parentLabel += `${resolvedCommand.name} `; resolvedCommand = subCmd; args.shift(); break;
|
||||
}
|
||||
if (subcommandArray.findIndex((v) => v === subCmd) === subcommandArray.length - 1) {
|
||||
hasSubCommands = false; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue