fix missing options bug
This commit is contained in:
parent
670105f579
commit
b752fcd12e
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue