From 013d76cb734aa6deb4f468395960fb9d985cd8f5 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 3fd5184d83..7c76aebb97 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.