Skip to content

Commit 013d76c

Browse files
cjihrigjasnell
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 <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Yorkie Liu <[email protected]>
1 parent 3a43568 commit 013d76c

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)