diff --git a/site/theme/template/Resources/Articles/index.tsx b/site/theme/template/Resources/Articles/index.tsx index c9f7afc334..ab624bbe2a 100644 --- a/site/theme/template/Resources/Articles/index.tsx +++ b/site/theme/template/Resources/Articles/index.tsx @@ -79,7 +79,7 @@ export default () => { const articles = data[isZhCN ? 'cn' : 'en']; const yearData: Record> = {}; - articles.forEach(article => { + articles?.forEach(article => { const year = moment(article.date).year(); yearData[year] = yearData[year] || {};