Skip to content

Commit

Permalink
Fix #53 when the process global is populated
Browse files Browse the repository at this point in the history
  • Loading branch information
Wedvich committed Jul 27, 2018
1 parent 19c3478 commit 0a4687b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/consoleSink.ts
Expand Up @@ -27,7 +27,10 @@ export class ConsoleSink implements Sink {
const stub = function () { };

// console.debug is no-op for Node, so use console.log instead.
const nodeConsole = !this.options.console && typeof process !== 'undefined' && process.versions.node;
const nodeConsole = !this.options.console &&
typeof process !== 'undefined' &&
process.versions &&
process.versions.node;

this.console = {
error: (internalConsole && (internalConsole.error || internalConsole.log)) || stub,
Expand Down

0 comments on commit 0a4687b

Please sign in to comment.