fix a problem reported by DeepScan

This commit is contained in:
Colin-XKL
2021-01-23 02:06:15 +08:00
parent 752505c033
commit 487521b2a5
+6 -6
View File
@@ -33,12 +33,12 @@ module.exports = async (ctx) => {
link: `https://www.zhihu.com/${usertype}/${id}/posts`, link: `https://www.zhihu.com/${usertype}/${id}/posts`,
description: `${authordescription}`, description: `${authordescription}`,
item: item:
list && list.length>0 &&
list.map((item) => ({ list.map((item) => ({
title: String(item.title), title: String(item.title),
description: `${item.content}`, description: `${item.content}`,
link: `${item.url}`, link: `${item.url}`,
pubDate: new Date(item.updated).toUTCString(), pubDate: new Date(item.updated).toUTCString(),
})), })),
}; };
}; };