We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 206b0e5 commit 1446827Copy full SHA for 1446827
lib/client.js
@@ -271,7 +271,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
271
if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {
272
this.scheme = location.scheme || 'http';
273
} else if (typeof this.scheme === 'undefined') {
274
- this.scheme = location.scheme || this.schemes[0];
+ this.scheme = this.schemes[0] || location.scheme;
275
}
276
277
if (typeof this.host === 'undefined' || this.host === '') {
0 commit comments