Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error.

This commit is contained in:
Garrick Cheung 2012-06-11 11:36:31 -07:00
parent 03a82b31e4
commit 409405f674
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// Returns true if this is a host that closes *before* it ends?!?!
module.exports.isAnEarlyCloseHost= function( hostName ) {
return hostName.match(".*google(apis)?.com$")
return hostName && hostName.match(".*google(apis)?.com$")
}