Skip to content

Commit 6c8a73d

Browse files
devsnekBridgeAR
authored andcommitted
lib: remove some useless assignments
PR-URL: #23199 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent d881b33 commit 6c8a73d

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

lib/events.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function _addListener(target, type, listener, prepend) {
224224

225225
if (existing === undefined) {
226226
// Optimize the case of one listener. Don't need the extra array object.
227-
existing = events[type] = listener;
227+
events[type] = listener;
228228
++target._eventsCount;
229229
} else {
230230
if (typeof existing === 'function') {

lib/internal/readline.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function* emitKeys(stream) {
258258
s += (ch = yield);
259259

260260
if (ch >= '0' && ch <= '9') {
261-
s += (ch = yield);
261+
s += yield;
262262
}
263263
}
264264

lib/net.js

-4
Original file line numberDiff line numberDiff line change
@@ -1056,10 +1056,6 @@ function afterConnect(status, handle, req, readable, writable) {
10561056
return;
10571057
}
10581058

1059-
// Update handle if it was wrapped
1060-
// TODO(indutny): assert that the handle is actually an ancestor of old one
1061-
handle = self._handle;
1062-
10631059
debug('afterConnect');
10641060

10651061
assert(self.connecting);

0 commit comments

Comments
 (0)