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!";
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue