From 443967ab654a13ddfafe50e264c6e218e121be55 Mon Sep 17 00:00:00 2001 From: JJMdzh Date: Sun, 8 Jun 2025 18:46:39 +0800 Subject: [PATCH] Update main.js (#1028) --- repo/js/背包材料统计/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/repo/js/背包材料统计/main.js b/repo/js/背包材料统计/main.js index 1bb82ccd..b3f66db9 100644 --- a/repo/js/背包材料统计/main.js +++ b/repo/js/背包材料统计/main.js @@ -1012,6 +1012,7 @@ function calculatePerTime(resourceName, pathName, recordDir) { if (quantityChange[resourceName] !== 0) { // 保留两位小数 perTime = parseFloat((runTime / quantityChange[resourceName]).toFixed(2)); + } else { perTime = Infinity; // 数量变化为 0 时,设置为 Infinity } completeRecords.push(perTime);