Skip to content

Commit

Permalink
Fixed unnecessary scopes mutation
Browse files Browse the repository at this point in the history
The issue due to the mutated scopes popped up in Swagger-UI: swagger-api/swagger-ui#2483
  • Loading branch information
frol authored Nov 13, 2016
1 parent aeead91 commit 1bc499e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
for(var ext in securityDefinition) {
helpers.extractExtensions(ext, securityDefinition);
if (ext === 'scopes') {
var scopes = securityDefinition[ext];
var scopes = _.cloneDeep(securityDefinition[ext]);
if(typeof scopes === 'object') {
scopes.vendorExtensions = {};
for (var s in scopes) {
Expand Down

0 comments on commit 1bc499e

Please sign in to comment.