From 7c398ba51c72caf0a7744dee6426f5884e3fa34a Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 11 Feb 2025 13:18:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20mihomo=20=E8=A6=86?= =?UTF-8?q?=E5=86=99=E9=85=8D=E7=BD=AE=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=99=AE=E9=80=9A=E8=84=9A=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/processors/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/package.json b/backend/package.json index 9e4e226..b87d992 100644 --- a/backend/package.json +++ b/backend/package.json @@ -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": { diff --git a/backend/src/core/proxy-utils/processors/index.js b/backend/src/core/proxy-utils/processors/index.js index f024594..5cc4a40 100644 --- a/backend/src/core/proxy-utils/processors/index.js +++ b/backend/src/core/proxy-utils/processors/index.js @@ -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( {