From 48ee4935c8ba7d2e74f760ad049ed7dfb557b67f Mon Sep 17 00:00:00 2001 From: hirrao <1142654374@qq.com> Date: Mon, 19 May 2025 23:18:41 +0800 Subject: [PATCH] fix(route/3dmgame): fix route error (#19133) --- lib/routes/3dmgame/news-center.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/3dmgame/news-center.ts b/lib/routes/3dmgame/news-center.ts index 781da54b9..5c8da6f50 100644 --- a/lib/routes/3dmgame/news-center.ts +++ b/lib/routes/3dmgame/news-center.ts @@ -34,7 +34,7 @@ export const route: Route = { async function handler(ctx) { const { category = '' } = ctx.req.param(); - const isArcPost = category && !Number.isNaN(category); // https://www.3dmgame.com/news/\d+/ + const isArcPost = category && !Number.isNaN(Number(category)); // https://www.3dmgame.com/news/\d+/ const url = `https://www.3dmgame.com/${category === 'news_36_1' ? category : 'news/' + category}`; const res = await got(url); const $ = load(res.data);