GeezerVison is showing github.com — lib: remove some useless assignments · nodejs/node@6c8a73d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/events.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -224,7 +224,7 @@ function _addListener(target, type, listener, prepend) { |
224 | 224 |
|
225 | 225 | if (existing === undefined) { |
226 | 226 | // Optimize the case of one listener. Don't need the extra array object. |
227 | | - existing = events[type] = listener; |
| 227 | + events[type] = listener; |
228 | 228 | ++target._eventsCount; |
229 | 229 | } else { |
230 | 230 | if (typeof existing === 'function') { |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/internal/readline.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -258,7 +258,7 @@ function* emitKeys(stream) { |
258 | 258 | s += (ch = yield); |
259 | 259 |
|
260 | 260 | if (ch >= '0' && ch <= '9') { |
261 | | - s += (ch = yield); |
| 261 | + s += yield; |
262 | 262 | } |
263 | 263 | } |
264 | 264 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: lib/net.js -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1056,10 +1056,6 @@ function afterConnect(status, handle, req, readable, writable) { |
1056 | 1056 | return; |
1057 | 1057 | } |
1058 | 1058 |
|
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 | | - |
1063 | 1059 | debug('afterConnect'); |
1064 | 1060 |
|
1065 | 1061 | assert(self.connecting); |
|