FIX: Show badge count of 1 on the badges page (#4153)
This commit is contained in:
parent
cc25716e47
commit
ab0c6e69e9
|
@ -25,9 +25,11 @@ export default Ember.Component.extend({
|
|||
|
||||
@computed('count', 'badge.grant_count')
|
||||
displayCount(count, grantCount) {
|
||||
const c = parseInt(count || grantCount || 0);
|
||||
if (c > 1) {
|
||||
return c;
|
||||
if (count == null) {
|
||||
return grantCount;
|
||||
}
|
||||
if (count > 1) {
|
||||
return count;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue