Skip to content

Commit 4ef18b3

Browse files
[Blazor] Invoke receiveHotReloadAsync directly (#47964)
1 parent 068bb72 commit 4ef18b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ internal static async Task InitializeAsync()
3535
// The agent is injected in to the hosted app and can serve this script that can provide results from local-storage.
3636
// See https://github.com/dotnet/aspnetcore/issues/37357#issuecomment-941237000
3737
await JSHost.ImportAsync(BlazorHotReloadModuleName, "/_framework/blazor-hotreload.js");
38-
ReceiveHotReload();
38+
await ReceiveHotReloadAsync();
3939
}
4040
}
4141

@@ -74,6 +74,6 @@ public static string GetApplyUpdateCapabilities()
7474
return (string)method.Invoke(obj: null, parameters: null)!;
7575
}
7676

77-
[JSImport("receiveHotReload", BlazorHotReloadModuleName)]
78-
private static partial void ReceiveHotReload();
77+
[JSImport("receiveHotReloadAsync", BlazorHotReloadModuleName)]
78+
private static partial Task ReceiveHotReloadAsync();
7979
}

0 commit comments

Comments
 (0)