From 409405f67426ba6548ba167f42393392e0805787 Mon Sep 17 00:00:00 2001 From: Garrick Cheung Date: Mon, 11 Jun 2012 11:36:31 -0700 Subject: [PATCH] Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error. --- lib/_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_utils.js b/lib/_utils.js index d0feed9..69fc300 100644 --- a/lib/_utils.js +++ b/lib/_utils.js @@ -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$") } \ No newline at end of file