From b752fcd12e8b9f04358b0fda03d2f3fbc4e0106d Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 13 Mar 2015 15:22:08 +0100 Subject: [PATCH] fix missing options bug --- lib/bing.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bing.js b/lib/bing.js index df26386..41ce18f 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -144,7 +144,7 @@ Bing.prototype.search = Bing.prototype.web; * @function */ Bing.prototype.images = function(query, callback, options) { - if (options.imagefilters) { + if (options && options.imagefilters) { var filterQuery = ''; var filters = Object.keys(options.imagefilters); filters.map(function(key, i) { @@ -162,6 +162,5 @@ function capitalizeFirstLetter(s) { return s.charAt(0).toUpperCase() + s.slice(1); } - module.exports = Bing;