Skip to content

Commit

Permalink
dns: remove duplicate code
Browse files Browse the repository at this point in the history
PR-URL: #32664
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
rickyes authored and targos committed Apr 11, 2020
1 parent a7a70fa commit e0e73f6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ function onlookup(err, addresses) {
if (err) {
return this.callback(dnsException(err, 'getaddrinfo', this.hostname));
}
if (this.family) {
this.callback(null, addresses[0], this.family);
} else {
this.callback(null, addresses[0], isIP(addresses[0]));
}
this.callback(null, addresses[0], this.family || isIP(addresses[0]));
}


Expand Down

0 comments on commit e0e73f6

Please sign in to comment.