fix(latepost): TypeError: Cannot read properties of undefined (reading 'title') (#17759)
TypeError: Cannot read properties of undefined (reading 'title')
This commit is contained in:
@@ -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日']),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user