mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
[bugfix]: deal with broken jellyfin
This commit is contained in:
parent
c3fcb7487c
commit
f79f9cc79e
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue