Skip to content

Commit

Permalink
refactor: remove useless optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
rmyz committed Oct 4, 2024
1 parent 4a11176 commit ee8ceda
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ export async function getErrorGroupMainStatistics({
name: getErrorName({ error: normalizedFields?.error } as APMError),
lastSeen: new Date(normalizedFields?.['@timestamp'] as string).getTime(),
occurrences: bucket.doc_count,
culprit: normalizedFields?.error?.culprit,
handled: normalizedFields?.error?.exception[0]?.handled,
type: normalizedFields?.error?.exception[0]?.type,
traceId: normalizedFields?.trace?.id,
culprit: normalizedFields?.error.culprit,
handled: normalizedFields?.error.exception[0].handled,
type: normalizedFields?.error.exception[0].type,
traceId: normalizedFields?.trace.id,
};
}) ?? [];

Expand Down

0 comments on commit ee8ceda

Please sign in to comment.