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 evanlucas committed Aug 24, 2016
1 parent 70648f4 commit d0cb52b
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 d0cb52b

Please sign in to comment.