Skip to content

Commit c8a1cc1

Browse files
author
Luca Forstner
authored
Fix guarding for event id in showReportDialog docs (#8925)
1 parent 21c6ec7 commit c8a1cc1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/platform-includes/user-feedback/example-widget/javascript.electron.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ init({
88
beforeSend(event) {
99
// Check if it is an exception, if so, show the report dialog
1010
// Note that this only will work in the renderer process, it's a noop on the main process
11-
if (event.exception) {
12-
showReportDialog();
11+
if (event.exception && event.event_id) {
12+
showReportDialog({ eventId: event_id });
1313
}
1414
return event;
1515
},

src/platform-includes/user-feedback/example-widget/javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you're using a framework like [React](/platforms/javascript/guides/react/) or
88
dsn: "___PUBLIC_DSN___",
99
beforeSend(event, hint) {
1010
// Check if it is an exception, and if so, show the report dialog
11-
if (event.exception) {
11+
if (event.exception && event.event_id) {
1212
Sentry.showReportDialog({ eventId: event.event_id });
1313
}
1414
return event;

0 commit comments

Comments
 (0)