feat(dns): reduce one isIP function call by simplifying condition

This commit is contained in:
CosminPerRam 2025-07-21 23:03:15 +03:00
parent 4645738699
commit f325f147d7

View file

@ -25,7 +25,7 @@ export default class DnsResolver {
this.logger.debug('DNS Lookup: ' + host)
// Check if host is IPv4 or IPv6
if (isIP(host) === 4 || isIP(host) === 6) {
if (isIP(host)) {
this.logger.debug('Raw IP Address: ' + host)
return { address: host }
}