diff --git a/lib/notion/getAllTags.js b/lib/notion/getAllTags.js index d8430ff7..7ee837cd 100644 --- a/lib/notion/getAllTags.js +++ b/lib/notion/getAllTags.js @@ -28,7 +28,7 @@ export function getAllTags({ const AllTagInfos = {} // 遍历所有文章 allPosts.forEach(post => { - post.tags.forEach(tag => { + post.tags?.forEach(tag => { // 如果标签已经存在 if (AllTagInfos[tag]) { if (