Skip to content

Commit

Permalink
Don't say "and more..." if there is no more
Browse files Browse the repository at this point in the history
  • Loading branch information
cxcorp committed Jun 29, 2017
1 parent 4d9bfce commit 0e67bbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flowdock-submitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ function menuToFields(menu) {
}

function getMessageBody(fields) {
return fields.length > 0
? `<span style="font-weight:bold">${fields[0].label}</span> and more ...`
: 'Nothing :('
if (fields.length === 0) return 'No info'
const andMore = fields.length > 1 ? ' and more...' : ''
return `<span style="font-weight:bold">${fields[0].label}</span>${andMore}`
}

function getThreadId() {
Expand Down

0 comments on commit 0e67bbb

Please sign in to comment.