Could you change it to:
```
if (matchDomain(match, domain)) {
  return true;
}
```