Skip to content

Commit d0cb52b

Browse 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

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/dns.js

Lines 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)