From 2c2be6855d49c4682769fdb9ebc7916ced8604f6 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 12 Oct 2023 15:13:07 -0500 Subject: [PATCH] refactor: remove TS ASsertions and use ?? --- src/commands/commands.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/commands.ts b/src/commands/commands.ts index 73bd4da9..ae15ab93 100644 --- a/src/commands/commands.ts +++ b/src/commands/commands.ts @@ -86,11 +86,11 @@ export default class Commands extends Command { ux.table( commands.map((command) => { // Massage some fields so it looks good in the table - command.description = (command.description || '').split(EOL)[0] - command.summary = command.summary || (command.description || '').split(EOL)[0] + command.description = (command.description ?? '').split(EOL)[0] + command.summary = command.summary ?? (command.description ?? '').split(EOL)[0] command.hidden = Boolean(command.hidden) - command.usage = command.usage || '' - return command as unknown as Record + command.usage ??= '' + return command }), { description: {