Skip to content

Commit

Permalink
feat: removed question mark if no emojis are configured
Browse files Browse the repository at this point in the history
closes #9
  • Loading branch information
snaerth authored and streamich committed Dec 10, 2018
1 parent c0e4ca8 commit 212c172
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/questions/type.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const pad = require('pad-right');

const typeToListItem = ({description, emoji, value}) => ({
name: (emoji || '❔') + ' ' + pad(value + ':', 12, ' ') + description,
value
});
const typeToListItem = ({description, emoji, value}) => {
const prefix = emoji ? emoji + ' ' : '';

return {
name: prefix + pad(value + ':', 12, ' ') + description,
value
}
};

exports.createQuestion = (state) => {
const {config} = state;
Expand Down

2 comments on commit 212c172

@streamich
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build version: 0.1.1-master.37 🤞 master on Travis 🎉

@streamich
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build version: 0.1.1-master.37 🤞 master on Travis 🎉

Please sign in to comment.