Skip to content

Commit

Permalink
lib: fix eslint early return
Browse files Browse the repository at this point in the history
The #45243 upgraded eslint
and apparently, when you specific a `@returns` early returns
aren't considered valid. This PR fixes this lint issue.

PR-URL: #45409
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
  • Loading branch information
RafaelGSS committed Nov 11, 2022
1 parent e8075fd commit e2181e0
Showing 1 changed file with 1 addition and 2 deletions.
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;
}

0 comments on commit e2181e0

Please sign in to comment.