Skip to content

Commit 94a64e9

Browse files
committed
Simplify agents selection
1 parent 93b1184 commit 94a64e9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export const WorkspaceBuildPageView: FC<WorkspaceBuildPageViewProps> = ({
5757
return <Loader />;
5858
}
5959

60-
const agents = build.resources
61-
.filter((r) => r.agents)
62-
.flatMap((r) => r.agents) as WorkspaceAgent[];
60+
const agents = build.resources.flatMap((r) => r.agents ?? []);
6361
const selectedAgent = agents.find((a) => a.id === tab.value);
6462

6563
return (

0 commit comments

Comments
 (0)