推荐为空时的样式

This commit is contained in:
tangly1024
2022-03-21 17:37:30 +08:00
parent 61c50eaf4c
commit 23869b8089

View File

@@ -9,7 +9,7 @@ import { useGlobal } from '@/lib/global'
* @returns
*/
export default function ArticleRecommend ({ recommendPosts }) {
if (!recommendPosts || !CONFIG_HEXO.ARTICLE_RECOMMEND) {
if (!CONFIG_HEXO.ARTICLE_RECOMMEND || !recommendPosts || recommendPosts.length === 0) {
return <></>
}
const { locale } = useGlobal()