Fix latency-probe races, stale offline menu, and byte formatting
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ function scale(n) {
|
||||
// "2.4 MB", human readable with a space.
|
||||
export function formatBytes(n) {
|
||||
const [v, i] = scale(n);
|
||||
const digits = i === 0 ? 0 : v < 10 ? 1 : v < 100 ? 1 : 0;
|
||||
const digits = i === 0 ? 0 : v < 10 ? 2 : v < 100 ? 1 : 0;
|
||||
return `${v.toFixed(digits)} ${UNITS[i]}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user