mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
[bugfix]: deal with broken jellyfin
This commit is contained in:
parent
c3fcb7487c
commit
f79f9cc79e
@ -1,8 +1,8 @@
|
||||
const SIZES = ['B', 'KiB', 'MiB', 'GiB', 'TiB'];
|
||||
|
||||
export const formatSizeString = (size: number): string => {
|
||||
export const formatSizeString = (size?: number): string => {
|
||||
let count = 0;
|
||||
let finalSize = size;
|
||||
let finalSize = size ?? 0;
|
||||
while (finalSize > 1024) {
|
||||
finalSize /= 1024;
|
||||
count += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user