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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • 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.