Skip to content

Commit 4f68800

Browse files
committed
cleanup
1 parent 1c4a136 commit 4f68800

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build-utils/sentry-instrumentation.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ class SentryInstrumentation {
139139
startTime,
140140
});
141141

142-
this.Sentry?.withActiveSpan(span || null, () => {
142+
if (!span) {
143+
return;
144+
}
145+
146+
this.Sentry.withActiveSpan(span, () => {
143147
this.Sentry?.startInactiveSpan({
144148
op: 'build',
145149
name: 'webpack build',
@@ -156,7 +160,7 @@ class SentryInstrumentation {
156160
}).end(endTime);
157161
});
158162

159-
span?.end();
163+
span.end();
160164
}
161165

162166
apply(compiler: webpack.Compiler) {

0 commit comments

Comments
 (0)