From f4675b5d54b2af5e476bf505542f457cb6d1dbbe Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 13 Mar 2015 15:31:44 +0100 Subject: [PATCH] dont break older versions --- lib/bing.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bing.js b/lib/bing.js index 41ce18f..d543c4f 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -144,7 +144,9 @@ Bing.prototype.search = Bing.prototype.web; * @function */ Bing.prototype.images = function(query, callback, options) { - if (options && options.imagefilters) { + if (options + && options.imagefilters + && typeof options.imagefilters === 'object') { var filterQuery = ''; var filters = Object.keys(options.imagefilters); filters.map(function(key, i) {