Skip to content

Commit 96a7068

Browse files
mjqclaude
andcommitted
fix(perf): Fix project lookup when multiple projects selected
eventView.project is a number array. Using a template literal on the whole array produces "1,2" with multiple projects, which never matches any project ID. Use the first element instead, matching the pattern in useEventViewProject. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 473e6b1 commit 96a7068

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/app/views/performance/eap/sampledEventsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function SampledEventsTable({eventView, transactionName, maxDuration}: Pr
123123
const theme = useTheme();
124124
const organization = useOrganization();
125125

126-
const project = projects.find(p => p.id === `${eventView.project}`);
126+
const project = projects.find(p => p.id === String(eventView.project[0]));
127127
const projectSlug = project?.slug;
128128

129129
const showReplayColumn =

static/app/views/performance/eap/segmentSpansTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function SegmentSpansTable({
6363
const {projects} = useProjects();
6464
const navigate = useNavigate();
6565

66-
const projectSlug = projects.find(p => p.id === `${eventView.project}`)?.slug;
66+
const projectSlug = projects.find(p => p.id === String(eventView.project[0]))?.slug;
6767
const spanCategory = decodeScalar(location.query?.[SpanFields.SPAN_CATEGORY]);
6868
const {selected, options} = getEAPSegmentSpansListSort(location, spanCategory);
6969

0 commit comments

Comments
 (0)