Skip to content

Commit d7a42a4

Browse files
author
chosunghoon
committed
fixup! events: add hasEventListener util for validate
1 parent 4befc9e commit d7a42a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ EventEmitter.prototype.prependOnceListener =
673673
EventEmitter.prototype.removeListener =
674674
function removeListener(type, listener) {
675675
checkListener(listener);
676-
676+
677677
if (!hasEventListener(this, type))
678678
return this;
679679

@@ -781,7 +781,7 @@ EventEmitter.prototype.removeAllListeners =
781781
function _listeners(target, type, unwrap) {
782782
if (!hasEventListener(target, type))
783783
return [];
784-
784+
785785
const evlistener = target._events[type];
786786

787787
if (typeof evlistener === 'function')

0 commit comments

Comments
 (0)