Skip to content

Commit 1bc499e

Browse files
authored
Fixed unnecessary scopes mutation
The issue due to the mutated scopes popped up in Swagger-UI: swagger-api/swagger-ui#2483
1 parent aeead91 commit 1bc499e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
310310
for(var ext in securityDefinition) {
311311
helpers.extractExtensions(ext, securityDefinition);
312312
if (ext === 'scopes') {
313-
var scopes = securityDefinition[ext];
313+
var scopes = _.cloneDeep(securityDefinition[ext]);
314314
if(typeof scopes === 'object') {
315315
scopes.vendorExtensions = {};
316316
for (var s in scopes) {

0 commit comments

Comments
 (0)