fix: Handle negative numbers in formatBytes

This commit is contained in:
Sidharth Vinod
2024-07-13 22:32:45 +05:30
parent df872427af
commit 3698c2b1e4

View File

@@ -22,6 +22,7 @@ const readStats = async (path: string): Promise<Record<string, number>> => {
};
const formatBytes = (bytes: number): string => {
bytes = Math.abs(bytes);
if (bytes == 0) {
return '0 Bytes';
}