fix(route): prevent `null` category in udn feed. (#13452)
This commit is contained in:
parent
d424adf021
commit
383fb9f02f
|
|
@ -55,7 +55,7 @@ module.exports = async (ctx) => {
|
|||
author: data.author.name,
|
||||
description,
|
||||
pubDate: timezone(parseDate(item.time.date, 'YYYY-MM-DD HH:mm'), +8),
|
||||
category: [data.articleSection, $("meta[name='subsection']").attr('content'), ...data.keywords.split(',')],
|
||||
category: [data.articleSection, !vip ? $("meta[name='subsection']").attr('content') : $('.article-head li.breadcrumb__item:last > b').text(), ...data.keywords.split(',')],
|
||||
link,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue