edwardhotchkiss/subdomain — pull request #5 by datenpunk (2014-04-30 12:54:27+00:00)
Title: Update subdomain.js

matches.length will error out of there are no matches at all and matches is undefined.
This checks if matches exist before calling matches.length.