mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-10 16:22:27 +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 : '';
|
const href = IS_BROWSER ? window.location.href : '';
|
||||||
if (typeof specUrl === 'string') {
|
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