Merge pull request #104 from tangly1024/preview

bugfix: 修复无法编译的问题
This commit is contained in:
tangly1024
2022-03-25 15:26:32 +08:00
committed by GitHub

View File

@@ -79,7 +79,7 @@ export async function getStaticProps ({ params: { slug } }) {
function getRecommendPost (post, allPosts, count = 6) {
let recommendPosts = []
const postIds = []
const currentTags = post.tags
const currentTags = post.tags || []
for (let i = 0; i < allPosts.length; i++) {
const p = allPosts[i]
if (p.id === post.id || p.type.indexOf('Post') < 0) {