fix: prevent crash on login when user has no active threads
All checks were successful
CI / ci (push) Successful in 1m4s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 13s

activeThreads[0].id in useEffect dependency array threw when the array
was empty. Use optional chaining to safely handle the empty case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 22:48:29 +02:00
parent a153b3c199
commit 570be6fcc1

View File

@@ -63,7 +63,7 @@ export function AddToThreadModal() {
open,
activeThreads.length,
activeThreads.some,
activeThreads[0].id,
activeThreads[0]?.id,
catalogSessionThreadId,
]);