diff --git a/index.js b/index.js index f0be5f2..d01d9ca 100644 --- a/index.js +++ b/index.js @@ -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) {