mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-29 11:52:28 +02:00
Do not floor the resultant string value.
This commit is contained in:
parent
4cfba05c56
commit
523834c403
|
@ -8,5 +8,5 @@ export default (count: number) => {
|
|||
const {divisor, suffix} =
|
||||
suffixes[Math.min(suffixes.length - 1, Math.floor(Math.log10(count) / 3))];
|
||||
|
||||
return (count / divisor).toFixed(2).slice(0, -1) + suffix;
|
||||
return String(Math.ceil((count / divisor) * 10) / 10).concat(suffix);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue