fix: prevent crash on login when user has no active threads
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:
@@ -63,7 +63,7 @@ export function AddToThreadModal() {
|
||||
open,
|
||||
activeThreads.length,
|
||||
activeThreads.some,
|
||||
activeThreads[0].id,
|
||||
activeThreads[0]?.id,
|
||||
catalogSessionThreadId,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user