Skip to content

fix(replay): guard against experimental frames in breadcrumbs #69060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 9 additions & 1 deletion static/app/components/replays/breadcrumbs/selectorList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ export default function SelectorList({frame}: {frame: ClickFrame}) {
const organization = useOrganization();

const componentName = frame.data.node?.attributes['data-sentry-component'];

// Guard against experimental frames for mobile replays
// TODO: can probably remove this check when mobile replay frames are
// more complete
const lastComponentIndex =
frame.message.lastIndexOf('>') === -1 ? 0 : frame.message.lastIndexOf('>') + 2;
'message' in frame
? frame.message?.lastIndexOf('>') === -1
? 0
: frame.message?.lastIndexOf('>') + 2
: 0;

return componentName ? (
<Fragment>
Expand Down