fix(web): Home 统计分类计数防御 category_counts 为 null 的空值访问
Docker Build and Push / build-image (push) Waiting to run
Android Build & Publish / build-android (push) Has been cancelled

This commit is contained in:
jif2.zhang
2026-09-15 13:47:02 +08:00
parent 34a8a0a5a1
commit c58220a213
+1 -1
View File
@@ -109,7 +109,7 @@ export default function Home() {
> >
<span style={{ fontSize: 24 }}>{cat.icon}</span> <span style={{ fontSize: 24 }}>{cat.icon}</span>
<span style={{ fontSize: 13, fontWeight: 500 }}>{cat.label}</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> </button>
))} ))}
</div> </div>