diff --git a/lib/routes/zhihu/posts.js b/lib/routes/zhihu/posts.js index 9c477eb5fc..8f9ef0613d 100644 --- a/lib/routes/zhihu/posts.js +++ b/lib/routes/zhihu/posts.js @@ -33,12 +33,12 @@ module.exports = async (ctx) => { link: `https://www.zhihu.com/${usertype}/${id}/posts`, description: `${authordescription}`, item: - list && + list.length>0 && list.map((item) => ({ - title: String(item.title), - description: `${item.content}`, - link: `${item.url}`, - pubDate: new Date(item.updated).toUTCString(), - })), + title: String(item.title), + description: `${item.content}`, + link: `${item.url}`, + pubDate: new Date(item.updated).toUTCString(), + })), }; };