From daf0577d6aa11ba98a49f2c26cd63df1cfecbe60 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 16 Jan 2026 23:19:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E4=BF=AE=E5=A4=8D=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E5=BE=84=E5=B1=82=E7=BA=A7=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 finally 块确保 loadingLevel 最小值为 2 - 防止配置错误导致的加载层级异常问题 --- repo/js/FullyAutoAndSemiAutoTools/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repo/js/FullyAutoAndSemiAutoTools/main.js b/repo/js/FullyAutoAndSemiAutoTools/main.js index 9165a9504..cd36cdd22 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/main.js +++ b/repo/js/FullyAutoAndSemiAutoTools/main.js @@ -246,6 +246,9 @@ async function init() { loadingLevel = parseInt(settings.loading_level) } catch (e) { log.warn("配置 {0} 错误,将使用默认值{0}", "加载路径层级", loadingLevel) + } finally { + // + loadingLevel = loadingLevel < 1 ? 2 : loadingLevel } // 优化版本 for (let i = 0; i < loadingLevel; i++) {