Skip to content

Commit cc3fe72

Browse files
committed
fix: Adjust HR for 17.12.4 and later
1 parent f462a07 commit cc3fe72

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/HotReloadSupport.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ namespace Uno.WebAssembly.Bootstrap {
3232
const webAppBasePath = this._unoConfig.environmentVariables["UNO_BOOTSTRAP_WEBAPP_BASE_PATH"];
3333

3434
// This assumes that the runtime includes the header as an env var:
35-
// https://github.com/dotnet/runtime/blob/79a71fc750652191eba18e19b3f98492e882cb5f/src/mono/browser/runtime/loader/config.ts#L336
36-
const browserToolsVariable = (<any>this._context).config.environmentVariables['ASPNETCORE-BROWSER-TOOLS'];
35+
// https://github.com/dotnet/runtime/blob/bcc0e894256b22736be3ffac876c7f21cffe070a/src/mono/browser/runtime/loader/config.ts#L332
36+
let browserToolsVariable =
37+
(<any>this._context).config.environmentVariables['ASPNETCORE-BROWSER-TOOLS']
38+
|| (<any>this._context).config.environmentVariables['__ASPNETCORE_BROWSER_TOOLS'];
3739

3840
// Take the place of the internal .NET for WebAssembly APIs for metadata updates coming
3941
// from the "BrowserLink" feature.
@@ -60,12 +62,12 @@ namespace Uno.WebAssembly.Bootstrap {
6062
},
6163

6264
getApplyUpdateCapabilities: function () {
63-
this.initialize();
65+
Blazor._internal.initialize();
6466
return HotReloadSupport._getApplyUpdateCapabilitiesMethod();
6567
},
6668

6769
applyHotReload: function (moduleId: any, metadataDelta: any, ilDelta: any, pdbDelta: any, updatedTypes: any) {
68-
this.initialize();
70+
Blazor._internal.initialize();
6971
return HotReloadSupport._applyHotReloadDeltaMethod(moduleId, metadataDelta, ilDelta, pdbDelta || "", updatedTypes || []);
7072
}
7173
};

0 commit comments

Comments
 (0)