From 984f3c91620a22210f47e7baa65ead2066ab0db6 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 17 May 2026 14:26:13 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Invalid=20Date=20graceful=20handling=20f?= =?UTF-8?q?=C3=BCr=20Records=20ohne=20created-Feld?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/routes/admin/dashboard/+page.svelte | 5 ++++- app/src/routes/admin/logs/+page.svelte | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/routes/admin/dashboard/+page.svelte b/app/src/routes/admin/dashboard/+page.svelte index a7f3312..d6906f2 100644 --- a/app/src/routes/admin/dashboard/+page.svelte +++ b/app/src/routes/admin/dashboard/+page.svelte @@ -42,7 +42,10 @@ }); function formatTime(iso: string) { - return new Date(iso).toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }); + if (!iso) return '—'; + const d = new Date(iso); + if (isNaN(d.getTime())) return '—'; + return d.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }); } diff --git a/app/src/routes/admin/logs/+page.svelte b/app/src/routes/admin/logs/+page.svelte index b975cc5..74d8224 100644 --- a/app/src/routes/admin/logs/+page.svelte +++ b/app/src/routes/admin/logs/+page.svelte @@ -38,7 +38,10 @@ } function formatDate(iso: string) { - return new Date(iso).toLocaleString('de-DE', { + if (!iso) return '—'; + const d = new Date(iso); + if (isNaN(d.getTime())) return '—'; + return d.toLocaleString('de-DE', { day: '2-digit', month: '2-digit', year: '2-digit', hour: '2-digit', minute: '2-digit' });