Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: fix eslint early return
The #45243 upgraded eslint
and apparently, when you specific a `@returns` early returns
aren't considered valid. This PR fixes this lint issue.
  • Loading branch information
RafaelGSS committed Nov 10, 2022
commit 8e21b8f45bb9efe35cb8bf2411c4d8dfb354893e
3 changes: 1 addition & 2 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,8 +1091,6 @@ function on(emitter, event, options) {
{ once: true });
}

return iterator;

function abortListener() {
errorHandler(new AbortError(undefined, { cause: signal?.reason }));
}
Expand Down Expand Up @@ -1120,4 +1118,5 @@ function on(emitter, event, options) {

iterator.return();
}
return iterator;
}