fix: 修复Singbox热补丁失败时的返回值格式,确保返回JSON字符串

This commit is contained in:
cmliu
2026-01-02 21:48:52 +08:00
parent c6411f36b0
commit 9115723bae

View File

@@ -935,7 +935,7 @@ function Singbox订阅配置文件热补丁(sb_json_text) {
return JSON.stringify(config, null, 2); return JSON.stringify(config, null, 2);
} catch (e) { } catch (e) {
console.error("Singbox热补丁执行失败:", e); console.error("Singbox热补丁执行失败:", e);
return sb_json_text; return JSON.stringify(JSON.parse(sb_json_text), null, 2);
} }
} }