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 <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
This commit is contained in:
parent
3a43568020
commit
013d76cb73
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user