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 <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
  • Loading branch information
RafaelGSS authored and danielleadams committed Jan 3, 2023
1 parent 2ca30ca commit b9d4ac2
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 b9d4ac2

Please sign in to comment.