Skip to content

Commit

Permalink
♻️ code review
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang committed Aug 27, 2024
1 parent 0ec8f9f commit 8757c08
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@ function HighlightsData({
const contextReplayItem = highlightContextDataItems.find(
e => e.data[0].key === 'replay_id'
);
const contextReplayId = contextReplayItem?.value ?? '';
const contextReplayId = contextReplayItem?.value ?? EMPTY_HIGHLIGHT_DEFAULT;

const tagReplayItem = highlightTagItems.find(e => e.originalTag.key === 'replayId');
const tagReplayId = tagReplayItem?.value ?? '';
const tagReplayId = tagReplayItem?.value ?? EMPTY_HIGHLIGHT_DEFAULT;

// if the id doesn't exist for either tag or context, it's rendered as '--'
const replayId =
contextReplayId.length > 2
contextReplayId === EMPTY_HIGHLIGHT_DEFAULT
? contextReplayId
: tagReplayId.length > 2
: tagReplayId === EMPTY_HIGHLIGHT_DEFAULT
? tagReplayId
: undefined;

Expand Down

0 comments on commit 8757c08

Please sign in to comment.