From 16494c0500b349db5b055df6ba055cd79228bc06 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 28 Feb 2025 10:08:23 +0800 Subject: [PATCH] fix(juejin/collections): filter out falsy values (#18472) --- lib/routes/juejin/collections.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/juejin/collections.ts b/lib/routes/juejin/collections.ts index d1eb2269c..b28f1c2e0 100644 --- a/lib/routes/juejin/collections.ts +++ b/lib/routes/juejin/collections.ts @@ -42,7 +42,7 @@ async function handler(ctx) { const collectionId = response.data.map((item) => item.tag_id); const temp = (await Promise.all(collectionId.map((id) => getArticleList(id)))) as Article[][]; - const posts = temp.flat(); + const posts = temp.flat().filter(Boolean); const list = parseList(posts); const result = await ProcessFeed(list);