From c532e4032b9a528dbc1a8d1a64198da9fef397b4 Mon Sep 17 00:00:00 2001 From: Felix Hsu Date: Mon, 16 Jan 2023 19:11:49 +0800 Subject: [PATCH] fix(route): add rss item link checking when cnbc rss is generating... (#11628) --- lib/v2/cnbc/rss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2/cnbc/rss.js b/lib/v2/cnbc/rss.js index 3ca95705f..ae2c23bac 100644 --- a/lib/v2/cnbc/rss.js +++ b/lib/v2/cnbc/rss.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const items = await Promise.all( feed.items - .filter((i) => !i.link.startsWith('https://www.cnbc.com/select/')) + .filter((i) => i.link && !i.link.startsWith('https://www.cnbc.com/select/')) .map((item) => ctx.cache.tryGet(item.link, async () => { const { data: response } = await got(item.link);