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 d0cb52b

Browse filesBrowse files
cjihrigevanlucas
authored andcommitted
dns: remove makeAsync() function check
makeAsync() is an internal method in the dns module. All of the functions that call makeAsync() have already validated that the callback is a function. This commit removes a redundant typeof function check. PR-URL: #8170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
1 parent 70648f4 commit d0cb52b
Copy full SHA for d0cb52b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎lib/dns.js‎

Copy file name to clipboardExpand all lines: lib/dns.js
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ function errnoException(err, syscall, hostname) {
5656
// callback.immediately = true;
5757
// }
5858
function makeAsync(callback) {
59-
if (typeof callback !== 'function') {
60-
return callback;
61-
}
6259
return function asyncCallback() {
6360
if (asyncCallback.immediately) {
6461
// The API already returned, we can invoke the callback immediately.

0 commit comments

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