diff --git a/lib/routes/rsshub/rss.js b/lib/routes/rsshub/rss.js index 7aafa589d..f2f729915 100644 --- a/lib/routes/rsshub/rss.js +++ b/lib/routes/rsshub/rss.js @@ -28,28 +28,26 @@ module.exports = async (ctx) => { title: 'RSSHub 有新路由啦', link: 'https://docs.rsshub.app', description: '万物皆可 RSS', - item: - list && - list.map(({ item, type }) => { - item = cheerio(item); - item.find('.header-anchor').remove(); - const titleEle = item.prevAll('h2').eq(0); - return { - title: `${titleEle[0].attribs.id} - ${item - .prevAll('h3') - .eq(0) - .text() - .slice(2)}`, - description: item.html(), - link: `https://docs.rsshub.app/${type}.html#${encodeURIComponent( - titleEle.find('.header-anchor').attr('href') && - titleEle - .find('.header-anchor') - .attr('href') - .slice(1) - )}`, - guid: item.attr('id'), - }; - }), + item: list.map(({ item, type }) => { + item = cheerio(item); + item.find('.header-anchor').remove(); + const titleEle = item.prevAll('h2').eq(0); + return { + title: `${titleEle[0].attribs.id} - ${item + .prevAll('h3') + .eq(0) + .text() + .slice(2)}`, + description: item.html(), + link: `https://docs.rsshub.app/${type}.html#${encodeURIComponent( + titleEle.find('.header-anchor').attr('href') && + titleEle + .find('.header-anchor') + .attr('href') + .slice(1) + )}`, + guid: item.attr('id'), + }; + }), }; };