Skip to content

Commit

Permalink
fix(feedback): Fix getCurrentHub undefined (#7871)
Browse files Browse the repository at this point in the history
Possible that the loader SDK has not loaded before rendering the widget modal (seems unlikely though)

Fixes DOCS-6A1
  • Loading branch information
billyvg authored Sep 19, 2023
1 parent ee9023c commit eb5a337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/feedback/feedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function FeedbackModal({open, onClose, onSubmit}: FeedbackModalProps) {
});
};

const user = window.Sentry?.getCurrentHub().getScope()?.getUser();
const user = window.Sentry?.getCurrentHub?.()?.getScope()?.getUser();

return (
<Dialog id="feedbackModal" open={open} ref={dialogRef} onClick={onClose}>
Expand Down

1 comment on commit eb5a337

@vercel
Copy link

@vercel vercel bot commented on eb5a337 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

docs.sentry.io
sentry-docs.sentry.dev
sentry-docs-git-master.sentry.dev

Please sign in to comment.