fix(web): Home 统计分类计数防御 category_counts 为 null 的空值访问
This commit is contained in:
+1
-1
@@ -109,7 +109,7 @@ export default function Home() {
|
||||
>
|
||||
<span style={{ fontSize: 24 }}>{cat.icon}</span>
|
||||
<span style={{ fontSize: 13, fontWeight: 500 }}>{cat.label}</span>
|
||||
<small style={{ fontSize: 11, color: "var(--text-tertiary)" }}>{stats?.category_counts[cat.key] ?? 0}件</small>
|
||||
<small style={{ fontSize: 11, color: "var(--text-tertiary)" }}>{stats?.category_counts?.[cat.key] ?? 0}件</small>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user