fix: storage quota not shown with Stalwart #577
This commit is contained in:
+1
-1
@@ -223,7 +223,7 @@ export function truncateText(text: string, maxLength: number): string {
|
||||
}
|
||||
|
||||
export function formatFileSize(bytes: number): string {
|
||||
if (bytes === 0) return '0 Bytes';
|
||||
if (!Number.isFinite(bytes) || bytes <= 0) return '0 Bytes';
|
||||
|
||||
const k = 1024;
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
||||
|
||||
Reference in New Issue
Block a user