Skip to content

Commit

Permalink
refactor: simplify optsOrStream.write check
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Apr 21, 2021
1 parent 0a4131e commit 9200afa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/node/opentelemetry-instrumentation-pino/src/pino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export class PinoInstrumentation extends InstrumentationBase {
const optsOrStream = args[0] as any;
if (
typeof optsOrStream === 'string' ||
(optsOrStream !== undefined &&
typeof optsOrStream['write'] === 'function')
typeof optsOrStream?.write === 'function'
) {
args.splice(0, 0, {
mixin: instrumentation._getMixinFunction(),
Expand Down

0 comments on commit 9200afa

Please sign in to comment.