Skip to content

Commit

Permalink
ref(core): Make getTransport method on client optional (#4013)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek authored Sep 27, 2021
1 parent 0e664af commit f96d47b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/tracing/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Transaction extends SpanClass implements TransactionInterface {

this._hub
.getClient()
?.getTransport()
?.getTransport?.()
.recordLostEvent?.(Outcome.SampleRate, 'transaction');

return undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export interface Client<O extends Options = Options> {
getOptions(): O;

/** Returns clients transport. */
getTransport(): Transport;
getTransport?(): Transport;

/**
* Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.
Expand Down

0 comments on commit f96d47b

Please sign in to comment.