Fix pluralization for exact numbers

pull/859/head
Uku Taht 6 years ago
parent c4c0bb2095
commit 6b277baed9

@ -258,7 +258,9 @@ class LineGraph extends React.Component {
topStatTooltip(stat) {
if (typeof(stat.count) == 'number') {
return stat.count.toLocaleString() + ' ' + stat.name
let name = stat.name.toLowerCase()
name = stat.count === 1 ? name.slice(0, -1) : name
return stat.count.toLocaleString() + ' ' + name
}
}

Loading…
Cancel
Save