From 0796793a21fd4ecab93a9752e6e49525ec86e01b Mon Sep 17 00:00:00 2001 From: Skriptach Date: Wed, 4 Dec 2019 00:42:40 +0200 Subject: [PATCH] fix: printing "undefined" (#52) --- src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index d6ff4895..728483a1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,12 +63,12 @@ export default class Help { if (!subject) { console.log(this.root()) - console.log() + console.log('') if (!this.opts.all) { topics = topics.filter(t => !t.name.includes(':')) } console.log(this.topics(topics)) - console.log() + console.log('') } else if (command) { this.showCommandHelp(command, topics) } else if (topic) { @@ -78,7 +78,7 @@ export default class Help { console.log(this.topic(topic)) if (topics.length > 0) { console.log(this.topics(topics)) - console.log() + console.log('') } } else { error(`command ${subject} not found`) @@ -92,10 +92,10 @@ export default class Help { const title = command.description && this.render(command.description).split('\n')[0] if (title) console.log(title + '\n') console.log(this.command(command)) - console.log() + console.log('') if (topics.length > 0) { console.log(this.topics(topics)) - console.log() + console.log('') } }