From 33c183fcaf38722816852a980258f582471a3f08 Mon Sep 17 00:00:00 2001 From: Kuinox Date: Wed, 9 Nov 2022 13:40:38 +0100 Subject: [PATCH] Fixed a concatenation issue in special URIs. Fixes #44927. --- .../Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts b/src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts index 46676d0d6f89..7e507b79dc6d 100644 --- a/src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts +++ b/src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts @@ -71,7 +71,7 @@ export module DotNet { // However since we're the one calling the import keyword, they would be resolved relative to // this framework bundle URL. Fix this by providing an absolute URL. if (typeof url === "string" && url.startsWith("./")) { - url = document.baseURI + url.substr(2); + url = new URL(url.substr(2), document.baseURI).toString(); } return import(/* webpackIgnore: true */ url);