fix(juejin/collections): filter out falsy values (#18472)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user