1
0
Fork 0

Attempted fix at leak

refactor/models
Bsian 2019-10-31 23:29:51 +00:00
parent c78f58bf5a
commit 358604ec48
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ export default class Util {
while (hasSubCommands) { while (hasSubCommands) {
if (!resolvedCommand.subcommands.size) { if (!resolvedCommand.subcommands.size) {
hasSubCommands = false; break; hasSubCommands = false; break;
} else if (!args[0]) {
hasSubCommands = false; break;
} else if (resolvedCommand.subcommands.has(args[0])) { } else if (resolvedCommand.subcommands.has(args[0])) {
resolvedCommand = resolvedCommand.subcommands.get(args[0]); resolvedCommand = resolvedCommand.subcommands.get(args[0]);
args.shift(); args.shift();