Skip to content

Commit

Permalink
dashboard: show "NaN MB" instead of "NaN.0 MB" when n is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan committed Jun 10, 2023
1 parent 81d06de commit 61af407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dashboard/assets/scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function numberWithCommas(s_or_n) {

function toStringTenths(n) {
let s = `${Math.round(10 * n) / 10}`;
if (s.indexOf(".") === -1) {
if (s !== "NaN" && s.indexOf(".") === -1) {
s += ".0";
}
return s;
Expand Down

0 comments on commit 61af407

Please sign in to comment.