Skip to content

Commit efafd23

Browse files
committed
fix: Additional undefined check
1 parent 2efbc98 commit efafd23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/apm/src/integrations/tracing.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export class Tracing implements Integration {
392392
* Uses logger.log to log things in the SDK or as breadcrumbs if defined in options
393393
*/
394394
private static _log(...args: any[]): void {
395-
if (Tracing.options.debug && Tracing.options.debug.writeAsBreadcrumbs) {
395+
if (Tracing.options && Tracing.options.debug && Tracing.options.debug.writeAsBreadcrumbs) {
396396
const _getCurrentHub = Tracing._getCurrentHub;
397397
if (_getCurrentHub) {
398398
_getCurrentHub().addBreadcrumb({
@@ -727,7 +727,7 @@ export class Tracing implements Integration {
727727
}
728728
});
729729
}
730-
if (Tracing.options.debug && Tracing.options.debug.spanDebugTimingInfo) {
730+
if (Tracing.options && Tracing.options.debug && Tracing.options.debug.spanDebugTimingInfo) {
731731
Tracing._addSpanDebugInfo(span);
732732
}
733733
span.finish();

0 commit comments

Comments
 (0)