diff --git a/src/class/Util.ts b/src/class/Util.ts index a2eb627..383f8e9 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -57,6 +57,8 @@ export default class Util { while (hasSubCommands) { if (!resolvedCommand.subcommands.size) { hasSubCommands = false; break; + } else if (!args[0]) { + hasSubCommands = false; break; } else if (resolvedCommand.subcommands.has(args[0])) { resolvedCommand = resolvedCommand.subcommands.get(args[0]); args.shift();