Skip to content

Commit 39d840c

Browse files
committed
fix conversion factor
1 parent cc8421e commit 39d840c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/homepage_stats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function formatBytes(numBytes) {
22
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
3-
const factor = 1000; // Conversion factor for bytes to the next unit
3+
const factor = 1024; // Conversion factor for bytes to the next unit
44

55
let unitIndex = 0;
66
while (numBytes >= factor && unitIndex < units.length - 1) {

0 commit comments

Comments
 (0)