fix: 修复 mihomo 覆写配置无法使用普通脚本的问题

This commit is contained in:
xream 2025-02-11 13:18:42 +08:00
parent 7002eee88d
commit 7c398ba51c
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.16.35",
"version": "2.16.36",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {

View File

@ -365,7 +365,9 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
if (output?.$file?.type === 'mihomoProfile') {
try {
let patch = YAML.safeLoad(script);
if (typeof patch !== 'object') patch = {};
// if (typeof patch !== 'object') patch = {};
if (typeof patch !== 'object')
throw new Error('patch is not an object');
output.$content = ProxyUtils.yaml.safeDump(
deepMerge(
{