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.
2 parents a694eed + 3c9e1b0 commit faadafbCopy full SHA for faadafb
lib/client.js
@@ -346,6 +346,9 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
346
if (typeof this.url === 'string') {
347
location = this.parseUri(this.url);
348
if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {
349
+ if (typeof location !== 'undefined' && typeof(location.scheme) !== 'undefined') {
350
+ this.scheme = location.scheme;
351
+ }
352
if(typeof window !== 'undefined' && typeof(window.location) !== 'undefined') {
353
// use the window scheme
354
this.scheme = window.location.protocol.replace(':','');
0 commit comments