Skip to content

Commit

Permalink
lib: fix eslint early return
Browse files Browse the repository at this point in the history
The nodejs#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
1 parent e8075fd commit 8e21b8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/events.js
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;
}

0 comments on commit 8e21b8f

Please sign in to comment.