Skip to content

Commit

Permalink
Fix broken isIPRange
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbucket-dev committed Oct 25, 2022
1 parent 3d4c8d9 commit cf9ebc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/isIPRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function isIPRange(str, version = '') {
return false;
}

const isValidIP = isIP(parts[0], version);
const isValidIP = isIP(parts[0], { version });
if (!isValidIP) {
return false;
}
Expand All @@ -40,7 +40,7 @@ export default function isIPRange(str, version = '') {
break;

default:
expectedSubnet = isIP(parts[0], '6') ? v6Subnet : v4Subnet;
expectedSubnet = isIP(parts[0], { version: 6 }) ? v6Subnet : v4Subnet;
}

return parts[1] <= expectedSubnet && parts[1] >= 0;
Expand Down

0 comments on commit cf9ebc7

Please sign in to comment.