diff options
author | RafaelGSS <rafael.nunu@hotmail.com> | 2022-11-10 19:40:53 +0300 |
---|---|---|
committer | RafaelGSS <rafael.nunu@hotmail.com> | 2022-11-11 19:35:08 +0300 |
commit | e2181e057b68ca392f817646575f9926b2e20ebd (patch) | |
tree | 65a9c9d3b6e5268f3f427dd3437a897bee31b7fd | |
parent | e8075fd1f81ec478f7f521fde7c7b3c83faf3297 (diff) |
lib: fix eslint early returnv19.x-staging
The https://github.com/nodejs/node/pull/45243 upgraded eslint
and apparently, when you specific a `@returns` early returns
aren't considered valid. This PR fixes this lint issue.
PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r-- | lib/events.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/events.js b/lib/events.js index 7abf18f42c0..004112cd353 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1091,8 +1091,6 @@ function on(emitter, event, options) { { once: true }); } - return iterator; - function abortListener() { errorHandler(new AbortError(undefined, { cause: signal?.reason })); } @@ -1120,4 +1118,5 @@ function on(emitter, event, options) { iterator.return(); } + return iterator; } |