Skip to content

Commit

Permalink
Additional TLD checks
Browse files Browse the repository at this point in the history
Check if TLD has a whois server in the IANA database. If not, fetch it from other sources.
  • Loading branch information
popeeyy committed Dec 4, 2022
1 parent a9eb2d3 commit 7b23b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whoiser.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const whoisTld = async (query, { timeout = 15000, raw = false, domainThirdLevel
data.__raw = result
}

if (!data.domain || !data.domain.length) {
if (!data.domain || !data.domain.length || !data.whois) {
const whois = await whoisTldAlternate(domainTld) // Query alternate sources
if (whois)
return {
Expand Down

0 comments on commit 7b23b13

Please sign in to comment.