diff --git a/components/CategoryList.js b/components/CategoryList.js
index f9197cd8..d803ef78 100644
--- a/components/CategoryList.js
+++ b/components/CategoryList.js
@@ -2,6 +2,9 @@ import Link from 'next/link'
import React from 'react'
const CategoryList = ({ currentCategory, categories }) => {
+ if (!categories) {
+ return <>>
+ }
return
- 分类:
{Object.keys(categories).map(category => {
diff --git a/components/TagList.js b/components/TagList.js
index 53137c51..10adfad9 100644
--- a/components/TagList.js
+++ b/components/TagList.js
@@ -1,4 +1,5 @@
import Link from 'next/link'
+import React from 'react'
/**
* 横向的标签列表
@@ -8,6 +9,9 @@ import Link from 'next/link'
* @constructor
*/
const TagList = ({ tags, currentTag }) => {
+ if (!tags) {
+ return <>>
+ }
return