From daa9c3035f198e7915f3cd9790018e817487673b Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sun, 15 Feb 2026 21:49:20 -0500 Subject: [PATCH] fix: Guard against undefined stats in AdminDashboard formatValue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API returns partial/empty stats object — individual fields can be undefined even when the object exists. Added null guard to prevent toLocaleString crash. Co-Authored-By: Claude Opus 4.6 --- frontend/src/views/platform-admin/AdminDashboard.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/platform-admin/AdminDashboard.vue b/frontend/src/views/platform-admin/AdminDashboard.vue index 82b15fa..ed71a3f 100644 --- a/frontend/src/views/platform-admin/AdminDashboard.vue +++ b/frontend/src/views/platform-admin/AdminDashboard.vue @@ -35,7 +35,8 @@ const quickLinks = [ { label: 'Servers', description: 'Monitor connected game servers', icon: MonitorCog, route: '/platform-admin/servers' }, ] -function formatValue(value: number, format: string): string { +function formatValue(value: number | undefined, format: string): string { + if (value == null) return '\u2014' if (format === 'currency') { return `$${value.toFixed(2)}` }