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

View File

@@ -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(),
})),
};
};