Avoid searches to permanent overwrite options
This commit is contained in:
parent
f242c2cc44
commit
f4c94d4280
1 changed files with 3 additions and 4 deletions
|
@ -50,11 +50,10 @@ var Bing = function( options ) {
|
||||||
throw "Error: Callback function required!";
|
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) {
|
_.extend(opts, options);
|
||||||
opts = _.extend(this.options, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
var reqUri = opts.rootUri
|
var reqUri = opts.rootUri
|
||||||
+ vertical
|
+ vertical
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue