From: sigoden Date: Sun, 6 Apr 2025 23:36:49 +0000 (+0800) Subject: fix: webui formatDirSize (#568) X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=59685da06e8797ef8089a7cf3ac72ba6bdcac68d;p=ozva-cloud fix: webui formatDirSize (#568) --- diff --git a/assets/index.js b/assets/index.js index eed8c42..b87e354 100644 --- a/assets/index.js +++ b/assets/index.js @@ -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}`; }