Skip to content

Commit

Permalink
dns: remove duplicate code
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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 addaleax committed Apr 7, 2020
1 parent 2f53eb4 commit 6779331
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 6779331

Please sign in to comment.