fix: 兼容空的订阅链接

This commit is contained in:
xream
2024-06-09 01:42:40 +08:00
parent 1ecac9da92
commit bf642ce0e6
6 changed files with 19 additions and 16 deletions

View File

@@ -68,10 +68,11 @@ async function getFlowInfo(req, res) {
return;
}
try {
let url = `${sub.url}`
.split(/[\r\n]+/)
.map((i) => i.trim())
.filter((i) => i.length)?.[0];
let url =
`${sub.url}`
.split(/[\r\n]+/)
.map((i) => i.trim())
.filter((i) => i.length)?.[0] || '';
let $arguments = {};
const rawArgs = url.split('#');