Skip to content

Commit 1e2a649

Browse files
treysisnodejs-github-bot
authored andcommitted
dns: added suggestion from comments
PR-URL: #39987 Fixes: #31566 Refs: #6307 Refs: #20710 Refs: #38099 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 9245085 commit 1e2a649

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/internal/dns/utils.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,7 @@ function emitInvalidHostnameWarning(hostname) {
196196
let dnsOrder = getOptionValue('--dns-result-order') || 'verbatim';
197197

198198
function getDefaultVerbatim() {
199-
switch (dnsOrder) {
200-
case 'verbatim':
201-
return true;
202-
case 'ipv4first':
203-
return false;
204-
default:
205-
return true;
206-
}
199+
return dnsOrder !== 'ipv4first';
207200
}
208201

209202
function setDefaultResultOrder(value) {

0 commit comments

Comments
 (0)