fix: miss gpu_selector value in catalog

This commit is contained in:
jialin
2025-04-03 13:36:09 +08:00
parent dd8059693d
commit 939f46c7e6
14 changed files with 156 additions and 64 deletions
+3 -2
View File
@@ -21,11 +21,12 @@ export const handleBatchRequest = async (
export const convertFileSize = (
sizeInBytes: number | undefined,
prec?: number
prec?: number,
allowEmpty = false
) => {
const precision = prec ?? 1;
if (!sizeInBytes) {
return '0';
return allowEmpty ? '' : '0';
}
if (sizeInBytes < 1024) {
return `${sizeInBytes.toFixed(precision)} B`;