mirror of
https://github.com/discourse/discourse.git
synced 2025-04-27 23:14:37 +08:00
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')
|
@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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user