We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bbace7 commit 110983cCopy full SHA for 110983c
1 file changed
lib/events.js
@@ -342,11 +342,11 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
342
let er;
343
if (args.length > 0)
344
er = args[0];
345
- if (domain !== null && domain !== undefined) {
+ if (domain) {
346
if (!er) {
347
er = new ERR_UNHANDLED_ERROR();
348
}
349
- if (typeof er === 'object' && er !== null) {
+ if (typeof er === 'object') {
350
er.domainEmitter = this;
351
er.domain = domain;
352
er.domainThrown = false;
0 commit comments