Skip to content

Commit b9d4ac2

Browse files
RafaelGSSdanielleadams
authored andcommitted
lib: fix eslint early return
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>
1 parent 2ca30ca commit b9d4ac2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/events.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,6 @@ function on(emitter, event, options) {
10911091
{ once: true });
10921092
}
10931093

1094-
return iterator;
1095-
10961094
function abortListener() {
10971095
errorHandler(new AbortError(undefined, { cause: signal?.reason }));
10981096
}
@@ -1120,4 +1118,5 @@ function on(emitter, event, options) {
11201118

11211119
iterator.return();
11221120
}
1121+
return iterator;
11231122
}

0 commit comments

Comments
 (0)