Skip to content

Commit

Permalink
fix: dns require (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Oct 30, 2020
1 parent 6e88cd4 commit 4c89dcf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resolvers/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ let dns

try {
dns = require('dns').promises
if (!dns) {
throw new Error('no dns available')
}
} catch (err) {
dns = require('dns-over-http-resolver')
}
Expand Down

0 comments on commit 4c89dcf

Please sign in to comment.