Browse Source

Take out one instance of iteration for the new style.

pull/3202/head
TheGoddessInari 7 years ago
parent
commit
bbcd2cecde
No known key found for this signature in database
GPG Key ID: 1209B1B7632D69A
  1. 6
      app.js

6
app.js

@ -98,9 +98,9 @@ ipc.on('setBadge', function(event, messageCount) {
function formatNumber(n) {
n = parseInt(n);
for (var i = 0; i < ranges.length; i++) {
if (n >= ranges[i].divider) {
return Math.round(n / ranges[i].divider).toString() + ranges[i].suffix;
for (let i of ranges) {
if (n >= i.divider) {
return Math.round(n / i.divider).toString() + i.suffix;
}
}
return n.toString();

Loading…
Cancel
Save