mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
feat(dns): reduce one isIP function call by simplifying condition
This commit is contained in:
parent
4645738699
commit
f325f147d7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue