diff --git a/lib/events.js b/lib/events.js index ff1648d6aa13e7..09abec75ba09e9 100644 --- a/lib/events.js +++ b/lib/events.js @@ -220,7 +220,7 @@ function _addListener(target, type, listener, prepend) { if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. - existing = events[type] = listener; + events[type] = listener; ++target._eventsCount; } else { if (typeof existing === 'function') { diff --git a/lib/internal/readline.js b/lib/internal/readline.js index 45125db0c223ef..3974ff4468bf54 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -258,7 +258,7 @@ function* emitKeys(stream) { s += (ch = yield); if (ch >= '0' && ch <= '9') { - s += (ch = yield); + s += yield; } } diff --git a/lib/net.js b/lib/net.js index fdf7e8a1d0f910..b5cdb894fc96df 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1081,10 +1081,6 @@ function afterConnect(status, handle, req, readable, writable) { return; } - // Update handle if it was wrapped - // TODO(indutny): assert that the handle is actually an ancestor of old one - handle = self._handle; - debug('afterConnect'); assert(self.connecting);