From 5d53a9a4b60b8bc0788d7899fb936336d7eb8797 Mon Sep 17 00:00:00 2001 From: Wee Bit Date: Wed, 2 Aug 2023 17:07:07 +0300 Subject: [PATCH] Handle falsy values in addHelpCommand() properly --- lib/command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command.js b/lib/command.js index 590a271dd..3f6df62bc 100644 --- a/lib/command.js +++ b/lib/command.js @@ -365,7 +365,7 @@ class Command extends EventEmitter { */ addHelpCommand(enableOrNameAndArgs, description) { - if (enableOrNameAndArgs === false) { + if (!enableOrNameAndArgs && enableOrNameAndArgs !== undefined) { this._addImplicitHelpCommand = false; } else { this._addImplicitHelpCommand = true;