Skip to content

Commit e0e73f6

Browse files
rickyestargos
authored andcommitted
dns: remove duplicate code
PR-URL: #32664 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a7a70fa commit e0e73f6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/dns.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ function onlookup(err, addresses) {
6565
if (err) {
6666
return this.callback(dnsException(err, 'getaddrinfo', this.hostname));
6767
}
68-
if (this.family) {
69-
this.callback(null, addresses[0], this.family);
70-
} else {
71-
this.callback(null, addresses[0], isIP(addresses[0]));
72-
}
68+
this.callback(null, addresses[0], this.family || isIP(addresses[0]));
7369
}
7470

7571

0 commit comments

Comments
 (0)