Skip to content

Commit

Permalink
Fix browser compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 2, 2021
1 parent 04b9daa commit 48bc0a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ class Emittery {
}

static get isDebugEnabled() {
if (typeof process !== 'object') {
return isGlobalDebugEnabled;
}

const {env} = process || {env: {}};
return env.DEBUG === 'emittery' || env.DEBUG === '*' || isGlobalDebugEnabled;
}
Expand Down

0 comments on commit 48bc0a9

Please sign in to comment.