From eb5a3373f15bd47f9b35d08f029ecb31ef71c557 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Tue, 19 Sep 2023 13:00:12 -0400 Subject: [PATCH] fix(feedback): Fix `getCurrentHub` undefined (#7871) Possible that the loader SDK has not loaded before rendering the widget modal (seems unlikely though) Fixes DOCS-6A1 --- src/components/feedback/feedbackModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/feedback/feedbackModal.tsx b/src/components/feedback/feedbackModal.tsx index 02dbb2b2ff2dc..608512c0e0aa4 100644 --- a/src/components/feedback/feedbackModal.tsx +++ b/src/components/feedback/feedbackModal.tsx @@ -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 (