Skip to content

Commit 6962389

Browse files
authored
fix(discover2): New event id field render crashes when given data isn't a string. (#18451)
1 parent ef522f1 commit 6962389

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/sentry/static/sentry/app/utils/discover/fieldRenderers.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,13 @@ const SPECIAL_FIELDS: SpecialFields = {
164164
id: {
165165
sortField: 'id',
166166
renderFunc: data => {
167+
const id: string | unknown = data?.id;
168+
if (typeof id !== 'string') {
169+
return null;
170+
}
167171
return (
168172
<Container>
169-
<EventId value={data.id} />
173+
<EventId value={id} />
170174
</Container>
171175
);
172176
},

0 commit comments

Comments
 (0)