Skip to content

Commit cf0cd60

Browse files
author
Dan Zajdband
committed
Removed unnecessary return statement from forEach callback and
transformed into an arrow function.
1 parent cafdcc7 commit cf0cd60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ class Emitter {
8282
return this;
8383
}
8484

85-
listeners.forEach(function(fn, i) {
85+
listeners.forEach((fn, i) => {
8686
if (fn === listener || fn.listener === listener) {
8787
// Removes the given listener.
8888
listeners.splice(i, 1);
89-
return;
9089
}
9190
});
9291

0 commit comments

Comments
 (0)