web/util/formatFileSize: don't parseFloat, allow .00 to stick around

prevents rapid jiggle in the queue
This commit is contained in:
wukko 2025-03-06 16:57:49 +06:00
parent f9c0decd4c
commit d98cb4c2d7
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -8,7 +8,7 @@ export const formatFileSize = (size: number | undefined) => {
units.pop();
}
const roundedSize = parseFloat(size.toFixed(2));
const roundedSize = size.toFixed(2);
const unit = units[units.length - 1] + "B";
return `${roundedSize} ${unit}`;
}