Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all type errors #1967

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Fix description(): do not set command description if not provided
  • Loading branch information
aweebit committed Aug 13, 2023
commit 2e03e2c45b468dd8ae7bdf5cf2364d27f8c55bbc
4 changes: 3 additions & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
*/
description(str, argsDescription) {
if (str === undefined && argsDescription === undefined) return this._description;
this._description = str;
if (str) {
this._description = str;
}
if (argsDescription) {
this._argsDescription = argsDescription;
}
Expand Down