FIX: Show badge count of 1 on the badges page (#4153)

This commit is contained in:
Gerhard Schlager 2016-04-08 20:53:42 +02:00 committed by Robin Ward
parent cc25716e47
commit ab0c6e69e9
1 changed files with 5 additions and 3 deletions

View File

@ -25,9 +25,11 @@ export default Ember.Component.extend({
@computed('count', 'badge.grant_count') @computed('count', 'badge.grant_count')
displayCount(count, grantCount) { displayCount(count, grantCount) {
const c = parseInt(count || grantCount || 0); if (count == null) {
if (c > 1) { return grantCount;
return c; }
if (count > 1) {
return count;
} }
}, },