Skip to content

Commit df39460

Browse files
committed
fixup! dns: runtime deprecate type coercion of dns.lookup options
1 parent 2adea65 commit df39460

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/dns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function lookup(hostname, options, callback) {
133133

134134
validateHints(hints);
135135
} else {
136-
if (options !== undefined && typeof options !== 'number') {
136+
if (options != null && typeof options !== 'number') {
137137
emitTypeCoercionDeprecationWarning();
138138
}
139139
family = options >>> 0;

lib/internal/dns/promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function lookup(hostname, options) {
131131

132132
validateHints(hints);
133133
} else {
134-
if (options !== undefined && typeof options !== 'number') {
134+
if (options != null && typeof options !== 'number') {
135135
emitTypeCoercionDeprecationWarning();
136136
}
137137
family = options >>> 0;

0 commit comments

Comments
 (0)