Skip to content

Commit

Permalink
fixup! dns: runtime deprecate type coercion of dns.lookup options
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 18, 2021
1 parent 2adea65 commit df39460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function lookup(hostname, options, callback) {

validateHints(hints);
} else {
if (options !== undefined && typeof options !== 'number') {
if (options != null && typeof options !== 'number') {
emitTypeCoercionDeprecationWarning();
}
family = options >>> 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/dns/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function lookup(hostname, options) {

validateHints(hints);
} else {
if (options !== undefined && typeof options !== 'number') {
if (options != null && typeof options !== 'number') {
emitTypeCoercionDeprecationWarning();
}
family = options >>> 0;
Expand Down

0 comments on commit df39460

Please sign in to comment.