Skip to content

Commit

Permalink
Improved UI for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
fboes committed Dec 20, 2017
1 parent 98e35bf commit 70d455f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/blogophon-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ const BlogophonConsole = function() {
*/
internal.getTagChoices = function() {
let tags = [];
if (config.tags) {
if (config.tags.length > 0) {
tags = config.tags;
tags.push(internal.moreTag, new inquirer.Separator());
tags.push(internal.moreTag);
if (config.tags.length > 4) {
tags.push(new inquirer.Separator());
}
}
return tags;
};
Expand Down Expand Up @@ -415,7 +418,7 @@ const BlogophonConsole = function() {
name: 'tags',
message: 'Tags',
when: function(answers) {
return config.tags.length && answers.classes !== 'Micro post';
return (config.tags.length > 0) && answers.classes !== 'Micro post';
},
default: function(answers) {
defaults.tags(answers).trim().split(/,\s?/);
Expand Down

0 comments on commit 70d455f

Please sign in to comment.