From 33da4428cc7f6d3ae6e52174437bfe1b18a668b2 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Thu, 28 Jul 2022 15:39:44 +0300 Subject: [PATCH] fix: invalid url when href is empty --- src/services/OpenAPIParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/OpenAPIParser.ts b/src/services/OpenAPIParser.ts index 6b36dc2abf..a28dc837b2 100644 --- a/src/services/OpenAPIParser.ts +++ b/src/services/OpenAPIParser.ts @@ -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; } }