diff --git a/lib/v2/apnews/topics.js b/lib/v2/apnews/topics.js index 1ac0d36b69..9b909a6ee7 100644 --- a/lib/v2/apnews/topics.js +++ b/lib/v2/apnews/topics.js @@ -17,6 +17,7 @@ module.exports = async (ctx) => { title: $(e).find('span.PagePromoContentIcons-text').text(), link: $(e).find('a').attr('href'), })) + .filter((e) => typeof e.link === 'string') .map((item) => ctx.cache.tryGet(item.link, async () => { const { data: response } = await got(item.link);