mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-05 21:00:18 +03:00
fix: wrong base url format causing error when constructing new URL
This commit is contained in:
parent
311d2ce64d
commit
7ceb434034
|
@ -58,7 +58,7 @@ export class OpenAPIParser {
|
|||
this.spec = spec;
|
||||
this.allowMergeRefs = spec.openapi.startsWith('3.1');
|
||||
|
||||
const href = IS_BROWSER ? window.location.href : '';
|
||||
const href = IS_BROWSER ? window.location.href : undefined;
|
||||
if (typeof specUrl === 'string') {
|
||||
this.specUrl = new URL(specUrl, href).href;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export class ExampleModel {
|
|||
this.summary = example.summary;
|
||||
this.description = example.description;
|
||||
if (example.externalValue) {
|
||||
this.externalValueUrl = new URL(example.externalValue, parser.specUrl || '').href;
|
||||
this.externalValueUrl = new URL(example.externalValue, parser.specUrl).href;
|
||||
}
|
||||
parser.exitRef(infoOrRef);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user