Skip to content

Commit bb6a05b

Browse files
authored
Fixed a concatenation issue in special URIs. (#44968)
1 parent 5e98069 commit bb6a05b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export module DotNet {
7171
// However since we're the one calling the import keyword, they would be resolved relative to
7272
// this framework bundle URL. Fix this by providing an absolute URL.
7373
if (typeof url === "string" && url.startsWith("./")) {
74-
url = document.baseURI + url.substr(2);
74+
url = new URL(url.substr(2), document.baseURI).toString();
7575
}
7676

7777
return import(/* webpackIgnore: true */ url);

0 commit comments

Comments
 (0)