Bugfix: verify ip before net.contains

This commit is contained in:
Douglas Barone 2021-04-06 08:56:33 -04:00
parent a8046e2c2b
commit 6bd7492f74

View File

@ -69,7 +69,9 @@ async function updateUserIdMappings() {
const net = ip.cidrSubnet(pAHost.cidr)
const devices = allDevices.filter(device => net.contains(device.ip))
const devices = allDevices.filter(
({ ip }) => isIPv4(ip) && net.contains(ip)
)
try {
// console.log(pAHost.id, pAHost.description, devices.length)