Skip to content

Commit d5d8670

Browse files
devsnekBethGriggs
authored andcommittedFeb 12, 2019
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 f2df92c commit d5d8670

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
@@ -1071,10 +1071,6 @@ function afterConnect(status, handle, req, readable, writable) {
10711071
return;
10721072
}
10731073

1074-
// Update handle if it was wrapped
1075-
// TODO(indutny): assert that the handle is actually an ancestor of old one
1076-
handle = self._handle;
1077-
10781074
debug('afterConnect');
10791075

10801076
assert(self.connecting);

0 commit comments

Comments
 (0)