Skip to content

Commit

Permalink
Fix browser compatibility
Browse files Browse the repository at this point in the history
Fixes #85
  • Loading branch information
sindresorhus committed Jun 1, 2021
1 parent 02b18ef commit 30a859a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ class Emittery {
}

static get isDebugEnabled() {
return process.env.DEBUG === 'emittery' || process.env.DEBUG === '*' || isGlobalDebugEnabled;
const {env} = process || {env: {}};
return env.DEBUG === 'emittery' || env.DEBUG === '*' || isGlobalDebugEnabled;
}

static set isDebugEnabled(newValue) {
Expand Down

0 comments on commit 30a859a

Please sign in to comment.