Skip to content

Commit

Permalink
overlay/credits: Set max number of zero of tips to 2
Browse files Browse the repository at this point in the history
_ref: #856
  • Loading branch information
sogehige committed Mar 21, 2018
1 parent 12be5ab commit 616b378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/overlays/credits.html
Expand Up @@ -339,7 +339,7 @@
<div class='aggregated-by'>Tips</div>
<div class='aggregated-column'>
`
for (let tip of _(tips).groupBy('username').map((o, k) => ({ 'username': k, 'amount': _.sumBy(o, 'amount'), 'currency': _.find(tips, (b) => b.username === k).currency }))) {
for (let tip of _(tips).groupBy('username').map((o, k) => ({ 'username': k, 'amount': Number.parseFloat(_.sumBy(o, 'amount')).toFixed(2), 'currency': _.find(tips, (b) => b.username === k).currency }))) {
output += `<div class='host-name'>${tip.username} ${tip.currency}${tip.amount}</div>`
}
output += `</div>`
Expand Down

0 comments on commit 616b378

Please sign in to comment.