From ab1fbe1d6fc5fc9ead8ba72d792584be687b9943 Mon Sep 17 00:00:00 2001 From: anime Date: Sat, 12 Apr 2025 01:13:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BF=AE=E5=A4=8Dtags=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6foreach=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3322 Closes #3038 Closes #3137 --- lib/notion/getAllTags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notion/getAllTags.js b/lib/notion/getAllTags.js index d8430ff7f45..7ee837cdf9f 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 (