halo-theme-chirpy icon indicating copy to clipboard operation
halo-theme-chirpy copied to clipboard

categories页面下对应分类“x 篇文章” 没有进行判空处理

Open Airsado opened this issue 7 months ago • 1 comments

问题介绍

问题产生在categories页面下。

对应分类如果不存在任何文章,那么 “x 篇文章”会显示为 “null 篇文章”

查看接口看到,因为 /apis/api.content.halo.run/v1alpha1/categories 中 对应的没有文章的分类不存在visiblePostCount字段

版本环境

  1. Halo 2.18.0
  2. 1panel面板
  3. chirpy主题 1.4.4版本

问题截图

image

Airsado avatar Aug 03 '24 09:08 Airsado