Skip to content

Commit ab1fbe1

Browse files
committed
fix(修复tags为空时foreach报错的问题)
Closes #3322 Closes #3038 Closes #3137
1 parent 4ee9656 commit ab1fbe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/notion/getAllTags.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function getAllTags({
2828
const AllTagInfos = {}
2929
// 遍历所有文章
3030
allPosts.forEach(post => {
31-
post.tags.forEach(tag => {
31+
post.tags?.forEach(tag => {
3232
// 如果标签已经存在
3333
if (AllTagInfos[tag]) {
3434
if (

0 commit comments

Comments
 (0)