mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
chore: move abs below return check
This commit is contained in:
@@ -22,10 +22,10 @@ const readStats = async (path: string): Promise<Record<string, number>> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formatBytes = (bytes: number): string => {
|
const formatBytes = (bytes: number): string => {
|
||||||
bytes = Math.abs(bytes);
|
|
||||||
if (bytes == 0) {
|
if (bytes == 0) {
|
||||||
return '0 Bytes';
|
return '0 Bytes';
|
||||||
}
|
}
|
||||||
|
bytes = Math.abs(bytes);
|
||||||
const base = 1024;
|
const base = 1024;
|
||||||
const decimals = 2;
|
const decimals = 2;
|
||||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||||
|
Reference in New Issue
Block a user