Skip to content

Commit 7497855

Browse files
committed
Fixing typing
1 parent cd65cfd commit 7497855

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

build/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class SentryPlugin extends plugin_base_1.PluginBase {
152152
if (uuid) {
153153
this.Sentry.setUser({ id: uuid });
154154
}
155-
const scope = this.Sentry.getCurrentScope ? this.Sentry.getCurrentScope() : undefined;
155+
const scope = this.Sentry.getCurrentScope?.();
156156
if (scope) {
157157
scope.addEventProcessor((event, hint) => {
158158
if (!this.isActive) {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ export default class SentryPlugin extends PluginBase {
172172
this.Sentry.setUser({ id: uuid });
173173
}
174174

175-
const scope = (this.Sentry as any).getCurrentScope ? this.Sentry.getCurrentScope() : undefined;
175+
const scope = this.Sentry.getCurrentScope?.();
176176
if (scope) {
177-
scope.addEventProcessor((event: any, hint: any) => {
177+
scope.addEventProcessor((event, hint) => {
178178
if (!this.isActive) {
179179
return;
180180
}

0 commit comments

Comments
 (0)