Skip to content

Commit

Permalink
fix: add check for isValid
Browse files Browse the repository at this point in the history
  • Loading branch information
srjames90 committed Aug 19, 2020
1 parent 9abb326 commit 9c34b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/opentelemetry-tracing/src/Tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class Tracer implements api.Tracer {
const spanId = this._idGenerator.generateSpanId();
let traceId;
let traceState;
if (!parentContext || !parentContext?.isValid()) {
if (!parentContext || !parentContext.isValid || !parentContext.isValid()) {
// New root span.
traceId = this._idGenerator.generateTraceId();
} else {
Expand Down

0 comments on commit 9c34b01

Please sign in to comment.