]> OzVa Git service - ozva-cloud/commitdiff
fix: webui formatDirSize (#568)
authorsigoden <sigoden@gmail.com>
Sun, 6 Apr 2025 23:36:49 +0000 (07:36 +0800)
committerGitHub <noreply@github.com>
Sun, 6 Apr 2025 23:36:49 +0000 (07:36 +0800)
assets/index.js

index eed8c42eecb1199586b96adc23941c3cdc26db86..b87e354bfcd9763e5e19b6cb0837af79a6ddd374 100644 (file)
@@ -881,8 +881,8 @@ function padZero(value, size) {
 }
 
 function formatDirSize(size) {
-  const unit = file.size === 1 ? "item" : "items";
-  const num = size >= MAX_SUBPATHS_COUNT ? `>${MAX_SUBPATHS_COUNT - 1}` : `${file.size}`;
+  const unit = size === 1 ? "item" : "items";
+  const num = size >= MAX_SUBPATHS_COUNT ? `>${MAX_SUBPATHS_COUNT - 1}` : `${size}`;
   return ` ${num} ${unit}`;
 }