fix: prevent "cannot read properties of undefined (reading 'map')" crash (#532)
This commit is contained in:
committed by
GitHub
Unverified
parent
925fbab86d
commit
11e28a2cfa
@@ -182,7 +182,7 @@ export function Sidebar() {
|
||||
}, [fetchAgents]);
|
||||
|
||||
const agentNameById = useMemo(
|
||||
() => Object.fromEntries(agents.map((agent) => [agent.id, agent.name])),
|
||||
() => Object.fromEntries((agents ?? []).map((agent) => [agent.id, agent.name])),
|
||||
[agents],
|
||||
);
|
||||
const sessionBuckets: Array<{ key: SessionBucketKey; label: string; sessions: typeof sessions }> = [
|
||||
|
||||
Reference in New Issue
Block a user