There's a missed semicolon in here.

I think I would prefer:

```javascript
if (match) {
    return [url.substring(0, url.indexOf(match[0]))];
} else {
    return null;
}
```

I think it makes the logic more clear, but that's up to you. :-)