From d0cb52b9678a1588e71a882189d70ac95e067814 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 18 Aug 2016 17:15:37 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/8170 Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Yorkie Liu --- lib/dns.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index 3fd5184d83f4ca..7c76aebb97f449 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -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.