diff options
author | Xidorn Quan <quanxunzhen@gmail.com> | 2013-03-03 12:53:51 +0800 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-04 16:20:40 +0100 |
commit | 009ba02e18a9ac8539c357be902573b1a014a13a (patch) | |
tree | e036d454ebd155d16a3a6c0197a7d1bd83b79b8a /lib | |
parent | 906f824bab8f022e1686c29fbf3141e0c174bae9 (diff) | |
download | android-node-v8-009ba02e18a9ac8539c357be902573b1a014a13a.tar.gz android-node-v8-009ba02e18a9ac8539c357be902573b1a014a13a.tar.bz2 android-node-v8-009ba02e18a9ac8539c357be902573b1a014a13a.zip |
dns: fix ReferenceError in resolve() error path
A typo in the variable name makes it throw a ReferenceError instead of
the expected "Unknown type" error when dns.resolve() is passed a bad
record type argument.
Fixes the following exception:
ReferenceError: type is not defined
at Object.exports.resolve (dns.js:189:40)
at /Users/bnoordhuis/src/master/test/simple/test-c-ares.js:48:9
<snip>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dns.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns.js b/lib/dns.js index 86b01ce713..ad919cc477 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -186,7 +186,7 @@ exports.resolve = function(domain, type_, callback_) { if (typeof resolver === 'function') { return resolver(domain, callback); } else { - throw new Error('Unknown type "' + type + '"'); + throw new Error('Unknown type "' + type_ + '"'); } }; |