fix: 修复 Tencent DNS 解析

This commit is contained in:
xream 2024-04-04 15:26:19 +08:00
parent 16b9cd9aaf
commit f1bf0e1e8d
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -490,7 +490,7 @@ const DOMAIN_RESOLVERS = {
}, },
}); });
const answers = resp.body.split(';').map((i) => i.split(',')[0]); const answers = resp.body.split(';').map((i) => i.split(',')[0]);
if (answers.length === 0) { if (answers.length === 0 || String(answers) === '0') {
throw new Error('No answers'); throw new Error('No answers');
} }
const result = answers[answers.length - 1]; const result = answers[answers.length - 1];