Skip to content

Commit

Permalink
dns: remove makeAsync() function check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cjihrig authored and jasnell committed Aug 22, 2016
1 parent 3a43568 commit 013d76c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ function errnoException(err, syscall, hostname) {
// callback.immediately = true;
// }
function makeAsync(callback) {
if (typeof callback !== 'function') {
return callback;
}
return function asyncCallback() {
if (asyncCallback.immediately) {
// The API already returned, we can invoke the callback immediately.
Expand Down

0 comments on commit 013d76c

Please sign in to comment.