修复打包编译错误

This commit is contained in:
tangly1024
2021-11-05 18:27:02 +08:00
parent ee51b8269c
commit 8fca64860b

View File

@@ -20,10 +20,9 @@ function shuffleSort (arr) {
const RecommendPosts = ({ currentPost, totalPosts }) => {
let filteredPosts = totalPosts
const currentTag = currentPost.tags[0]
// 筛选同标签
if (currentPost.tags && currentPost.tags.length) {
const currentTag = currentPost.tags[0]
filteredPosts = totalPosts.filter(
post => post && post.tags && post.tags.includes(currentTag) && post.slug !== currentPost.slug
)