From bc74d3bbac4c75eb55d4080c66e6b53d367707b7 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Fri, 2 Oct 2026 11:22:10 +0200 Subject: [PATCH] fix: keep the app from closing when a calendar widget opens it offline #52 --- src/components/calendar/CalendarShareSheet.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/calendar/CalendarShareSheet.tsx b/src/components/calendar/CalendarShareSheet.tsx index 15c89621..52be9dde 100644 --- a/src/components/calendar/CalendarShareSheet.tsx +++ b/src/components/calendar/CalendarShareSheet.tsx @@ -102,6 +102,9 @@ export function CalendarShareSheet({ calendar, onShare, onClose }: CalendarShare ); const candidates = React.useMemo(() => { + // The sheet is mounted with the Calendar tab, before a session may exist + // (an offline cold start): nobody to list yet, and no own id to read. + if (principals.length === 0) return []; const self = ownPrincipalId(); const q = search.trim().toLowerCase(); return principals