From b93dfabe1a6eb243a88e926ca987f338762b97e4 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:03:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D=20=E5=85=A8?= =?UTF-8?q?=E5=9B=BD=E6=B0=94=E8=B1=A1=E9=A2=84=E8=AD=A6=20=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98=20(#15078)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/nmc/weatheralarm.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/routes/nmc/weatheralarm.ts b/lib/routes/nmc/weatheralarm.ts index ff031d17c..f56b5bb97 100644 --- a/lib/routes/nmc/weatheralarm.ts +++ b/lib/routes/nmc/weatheralarm.ts @@ -31,7 +31,7 @@ export const route: Route = { }; async function handler(ctx) { - const { province } = ctx.req.param(); + const { province = '' } = ctx.req.param(); const alarmInfoURL = `http://www.nmc.cn/rest/findAlarm`; const { data: response } = await got(alarmInfoURL, { searchParams: { @@ -42,7 +42,6 @@ async function handler(ctx) { province, }, }); - const list = response.data.page.list.map((item) => ({ title: item.title, link: `http://www.nmc.cn${item.url}`,