Revert "dns: verify argument is valid function in resolve"
authorFedor Indutny <fedor.indutny@gmail.com>
Fri, 7 Feb 2014 22:15:29 +0000 (02:15 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Fri, 7 Feb 2014 22:15:29 +0000 (02:15 +0400)
This reverts commit 2ee86c624ecd6b9dbaad10989143325fc64778cd.

lib/dns.js

index dcf2128..15ee6a4 100644 (file)
@@ -184,11 +184,9 @@ exports.resolve = function(domain, type_, callback_) {
   if (typeof type_ == 'string') {
     resolver = resolveMap[type_];
     callback = callback_;
-  } else if (util.isFunction(type_)) {
+  } else {
     resolver = exports.resolve4;
     callback = type_;
-  } else {
-    throw new Error('Type must be a string')
   }
 
   if (typeof resolver === 'function') {