From 5c67530be0809acb768443dbf548d95aa4d7fb0d Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Fri, 30 Sep 2022 15:40:26 +0200 Subject: [PATCH] Fix check --- lib/commands/definitions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commands/definitions.ts b/lib/commands/definitions.ts index 1458259..3c32698 100644 --- a/lib/commands/definitions.ts +++ b/lib/commands/definitions.ts @@ -18,7 +18,7 @@ function illegalUse(raw: string, cmd: Command): string[] { } function checkFlags(flags: string[], cmd: Command): boolean { - if (!flags || flags === []) return true; + if (!flags || flags.length === 0) return true; if (!cmd.flags) return false; for (const flag of flags) { @@ -30,7 +30,7 @@ function checkFlags(flags: string[], cmd: Command): boolean { } function checkSubcmd(subcmds: string[], cmd: Command): boolean { - if (!subcmds || subcmds === []) return true; + if (!subcmds || subcmds.length === 0) return true; if (!cmd.subcommands) return false; for (const sc of subcmds) {