Skip to content

Commit

Permalink
fix: invalid url when href is empty (#2105)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk committed Jul 28, 2022
1 parent 2a7046b commit e5f0235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/OpenAPIParser.ts
Expand Up @@ -35,7 +35,7 @@ export class OpenAPIParser {

const href = IS_BROWSER ? window.location.href : '';
if (typeof specUrl === 'string') {
this.specUrl = new URL(specUrl, href).href;
this.specUrl = href ? new URL(specUrl, href).href : specUrl;
}
}

Expand Down

0 comments on commit e5f0235

Please sign in to comment.