mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-25 04:59:52 +08:00
fix(config): 修复加载路径层级配置验证逻辑
- 添加 finally 块确保 loadingLevel 最小值为 2 - 防止配置错误导致的加载层级异常问题
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user