fix: 处理 YAML short-idnull 的情况

This commit is contained in:
xream 2025-03-15 16:29:19 +08:00
parent 1281df59f3
commit fc56df7bfd
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -75,6 +75,8 @@ function Clash() {
// 是否被引号包裹
if (/^(['"]).*\1$/.test(afterTrim)) {
return `short-id: ${afterTrim}`;
} else if (['null'].includes(afterTrim)) {
return `short-id: ${afterTrim}`;
} else {
return `short-id: "${afterTrim}"`;
}