Skip to content

Commit e2181e0

Browse files
committed
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruy Adorno <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
1 parent e8075fd commit e2181e0

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)