mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-29 22:14:26 +02:00
web/util/formatFileSize: don't parseFloat, allow .00 to stick around
prevents rapid jiggle in the queue
This commit is contained in:
parent
f9c0decd4c
commit
d98cb4c2d7
@ -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}`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user