fix(ui): defensive optional chains across summaries/medications/preferences/entries/measurements

Same anti-pattern as the v1.4.2 hotfix on /dashboard and /insights —
the optional chain protected only the outer object, so any field on
the inner object that didn't exist threw at access time. Marc's
reports flagged dashboard, insights, medications,
notification-preferences, admin login overview, mood list, and
measurement list. Applied 'data?.X?.Y' to every spot the regex
caught.
This commit is contained in:
Marc-André Bombeck committed 2026-05-08 18:36:13 +02:00
1 parent cfbd822862
commit 680b0019c1
6 files changed
+15 -15

No files matched your search

@@ -45,7 +45,7 @@ export function LoginOverviewSection({ id }: { id: string }) {
const entries =
filter === "failed"
? data?.entries.filter((e) => e.action === "auth.login.failed")
? data?.entries?.filter((e) => e.action === "auth.login.failed")
: data?.entries;
return (