Skip to content

Commit 1446827

Browse files
committed
favoring user specified scheme over the url scheme
1 parent 206b0e5 commit 1446827

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
@@ -271,7 +271,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
271271
if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {
272272
this.scheme = location.scheme || 'http';
273273
} else if (typeof this.scheme === 'undefined') {
274-
this.scheme = location.scheme || this.schemes[0];
274+
this.scheme = this.schemes[0] || location.scheme;
275275
}
276276

277277
if (typeof this.host === 'undefined' || this.host === '') {

0 commit comments

Comments
 (0)