Skip to content

Commit 06d16cf

Browse files
rickyestargos
authored andcommittedApr 22, 2020
dns: remove duplicate code
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>
1 parent d2c86a9 commit 06d16cf

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
@@ -63,11 +63,7 @@ function onlookup(err, addresses) {
6363
if (err) {
6464
return this.callback(dnsException(err, 'getaddrinfo', this.hostname));
6565
}
66-
if (this.family) {
67-
this.callback(null, addresses[0], this.family);
68-
} else {
69-
this.callback(null, addresses[0], isIP(addresses[0]));
70-
}
66+
this.callback(null, addresses[0], this.family || isIP(addresses[0]));
7167
}
7268

7369

0 commit comments

Comments
 (0)