From 5cd238205725f00a8c8830bf824aa2b06427b8c6 Mon Sep 17 00:00:00 2001 From: lidashuang Date: Sat, 30 Nov 2024 23:37:27 +0800 Subject: [PATCH] fix(latepost): TypeError: Cannot read properties of undefined (reading 'title') (#17759) TypeError: Cannot read properties of undefined (reading 'title') --- lib/routes/latepost/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/latepost/index.ts b/lib/routes/latepost/index.ts index 39e5b262c..466215021 100644 --- a/lib/routes/latepost/index.ts +++ b/lib/routes/latepost/index.ts @@ -72,7 +72,7 @@ async function handler(ctx) { let items = response.data.slice(0, limit).map((item) => ({ title: item.title, link: new URL(item.detail_url, rootUrl).href, - category: [item.is_dj ? exclusiveCategory : undefined, item.programa ? columns[item.programa].title : undefined, ...item.label.map((c) => c.label)], + category: [item.is_dj ? exclusiveCategory : undefined, item.programa ? columns[item.programa]?.title : undefined, ...item.label.map((c) => c.label)], guid: item.id, pubDate: parseDate(item.release_time, ['MM月DD日', 'YYYY年MM月DD日']), }));