Prevent TypeError in sentry beforeSend

This commit is contained in:
Tyler Hallada 2022-09-12 21:19:04 -04:00
parent ec65c6aaa3
commit 48e524b247

View File

@ -20,7 +20,7 @@ Sentry.init({
// that it will also get attached to your source maps // that it will also get attached to your source maps
beforeSend(event) { beforeSend(event) {
const logRocketSession = LogRocket.sessionURL; const logRocketSession = LogRocket.sessionURL;
if (logRocketSession !== null) { if (event.extra && logRocketSession !== null) {
event.extra["LogRocket"] = logRocketSession; event.extra["LogRocket"] = logRocketSession;
return event; return event;
} else { } else {