Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions static/app/utils/fields/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2581,11 +2581,11 @@ export const getFieldDefinition = (
): FieldDefinition | null => {
switch (type) {
case 'replay':
if (key in REPLAY_FIELD_DEFINITIONS) {
if (REPLAY_FIELD_DEFINITIONS.hasOwnProperty(key)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return REPLAY_FIELD_DEFINITIONS[key];
}
if (key in REPLAY_CLICK_FIELD_DEFINITIONS) {
if (REPLAY_CLICK_FIELD_DEFINITIONS.hasOwnProperty(key)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return REPLAY_CLICK_FIELD_DEFINITIONS[key];
}
Expand All @@ -2595,7 +2595,7 @@ export const getFieldDefinition = (
}
return null;
case 'feedback':
if (key in FEEDBACK_FIELD_DEFINITIONS) {
if (FEEDBACK_FIELD_DEFINITIONS.hasOwnProperty(key)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return FEEDBACK_FIELD_DEFINITIONS[key];
}
Expand Down Expand Up @@ -2625,7 +2625,7 @@ export const getFieldDefinition = (
return null;

case 'log':
if (key in LOG_FIELD_DEFINITIONS) {
if (LOG_FIELD_DEFINITIONS.hasOwnProperty(key)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return LOG_FIELD_DEFINITIONS[key];
}
Expand All @@ -2644,8 +2644,11 @@ export const getFieldDefinition = (

case 'event':
default:
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return EVENT_FIELD_DEFINITIONS[key] ?? null;
if (EVENT_FIELD_DEFINITIONS.hasOwnProperty(key)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
return EVENT_FIELD_DEFINITIONS[key];
}
return null;
}
};

Expand Down
Loading