From c9417777bb38cd1d9f1c4274b63d07f421ab797a Mon Sep 17 00:00:00 2001 From: Dicken Date: Thu, 28 May 2026 00:54:10 +0200 Subject: [PATCH] Dateien nach "frontend/src/tools" hochladen --- frontend/src/tools/nachrichten.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/tools/nachrichten.jsx b/frontend/src/tools/nachrichten.jsx index 7c1dcc9..1d363d2 100644 --- a/frontend/src/tools/nachrichten.jsx +++ b/frontend/src/tools/nachrichten.jsx @@ -388,7 +388,9 @@ function InfoBox({ color, children }) { } function formatMsgTime(isoStr) { - const d = new Date((isoStr || '').replace(' ', 'T')); + if (!isoStr) return ''; + const d = new Date(isoStr.replace(' ', 'T')); + if (isNaN(d)) return ''; const now = new Date(); const isToday = d.toDateString() === now.toDateString(); const isThisYear = d.getFullYear() === now.getFullYear();