Do not repeat "gems" in the badge value

This commit is contained in:
Raphaël Pinson 2015-03-22 22:54:37 +01:00
parent 94ab0baf10
commit 507ee33bdd

View File

@ -1211,10 +1211,7 @@ cache(function(data, match, sendBadge, request) {
} else {
badgeData.colorscheme = 'brightgreen';
}
badgeData.text[1] = count+' gem';
if (count > 1) {
badgeData.text[1] += 's';
}
badgeData.text[1] = count;
sendBadge(format, badgeData);
} catch (e) {
badgeData.text[1] = 'invalid';