From 358604ec48ca929921b384e0db79cf30cba9e77c Mon Sep 17 00:00:00 2001 From: Bsian Date: Thu, 31 Oct 2019 23:29:51 +0000 Subject: [PATCH] Attempted fix at leak --- src/class/Util.ts | 2 ++ 1 file changed, 2 insertions(+) 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();