mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +03:00
fix: invalid url when href is empty (#2105)
This commit is contained in:
parent
2a7046b9d3
commit
e5f0235985
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user