Skip to content

Commit

Permalink
Fix a minor bug in subnetMatch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMGreene authored and whitequark committed Aug 20, 2017
1 parent 99d2ae5 commit 83174a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ipaddr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ipaddr.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
for (k = 0, len = rangeSubnets.length; k < len; k++) {
subnet = rangeSubnets[k];
if (address.kind === subnet[0].kind) {
if (address.kind() === subnet[0].kind()) {
if (address.match.apply(address, subnet)) {
return rangeName;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ipaddr.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') ->
rangeSubnets = [ rangeSubnets ]

for subnet in rangeSubnets
if address.kind == subnet[0].kind
if address.kind() == subnet[0].kind()
if address.match.apply(address, subnet)
return rangeName

Expand Down

0 comments on commit 83174a9

Please sign in to comment.