lib: fix eslint early return

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>
This commit is contained in:
RafaelGSS committed 2022-11-11 13:35:08 -03:00
1 parent e8075fd1f8
commit e2181e057b
1 file changed
+1 -2
+1 -2
View File
@@ -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;
}