Avoid searches to permanent overwrite options

This commit is contained in:
goferito 2015-05-07 11:27:44 +02:00
parent f242c2cc44
commit f4c94d4280

View file

@ -50,11 +50,10 @@ var Bing = function( options ) {
throw "Error: Callback function required!";
}
var opts = this.options;
// Create a copy of the options, to avoid permanent overwrites
var opts = JSON.parse(JSON.stringify(this.options));
if (options !== null) {
opts = _.extend(this.options, options);
}
_.extend(opts, options);
var reqUri = opts.rootUri
+ vertical