From 5a51b300524230db2c4faf8d0d1f001db72d0a49 Mon Sep 17 00:00:00 2001 From: goferito Date: Wed, 5 Nov 2014 18:16:26 +0100 Subject: [PATCH] Bug fix --- lib/bing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bing.js b/lib/bing.js index 5af1292..f545393 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -78,7 +78,7 @@ var Bing = function( options ) { }, function(err, res, body){ - if(res.statusCode !== 200){ + if(res && res.statusCode !== 200){ err = new Error(body); }else{