fix: guard total_count in AuditLog against undefined before toLocaleString

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-04-29 15:32:07 +01:00
parent e7917cde10
commit dfc9bbe37b

View file

@ -307,7 +307,7 @@ export function AuditLog() {
<>
{allQuery.data && (
<p className="text-sm text-gray-500 mb-2">
{allQuery.data.total_count.toLocaleString()} events total
{(allQuery.data.total_count ?? 0).toLocaleString()} events total
</p>
)}
<AuditTable logs={allQuery.data?.logs ?? []} isLoading={allQuery.isLoading} />