Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a7f28a0

Browse filesBrowse files
aks-rvagg
authored andcommitted
http: remove unneeded cb check from setTimeout()
- This check is already covered in EventEmitter#addListener() Refs: #3618 PR-URL: #3631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent a0db5fb commit a7f28a0
Copy full SHA for a7f28a0

File tree

Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Collapse file

‎lib/_http_outgoing.js‎

Copy file name to clipboardExpand all lines: lib/_http_outgoing.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ exports.OutgoingMessage = OutgoingMessage;
9191
OutgoingMessage.prototype.setTimeout = function(msecs, callback) {
9292

9393
if (callback) {
94-
if (typeof callback !== 'function')
95-
throw new TypeError('callback must be a function');
9694
this.on('timeout', callback);
9795
}
9896

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.