Browse Source

Fixed a concatenation issue in special URIs. (#44968)

Kuinox 3 years ago
parent
commit
bb6a05b71b

+ 1 - 1
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);