Skip to content

Commit 5fed812

Browse files
Fixed boot config issue. (#41976)
1 parent 17658ad commit 5fed812

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Platform/BootConfig.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ export class BootConfigResult {
1414
loadBootResource('manifest', 'blazor.boot.json', '_framework/blazor.boot.json', '') :
1515
defaultLoadBlazorBootJson('_framework/blazor.boot.json');
1616

17-
const bootConfigResponse = loaderResponse instanceof Promise ?
18-
await loaderResponse :
19-
await defaultLoadBlazorBootJson(loaderResponse ?? '_framework/blazor.boot.json');
17+
let bootConfigResponse: Response;
18+
19+
if (!loaderResponse) {
20+
bootConfigResponse = await defaultLoadBlazorBootJson('_framework/blazor.boot.json');
21+
} else if (typeof loaderResponse === 'string') {
22+
bootConfigResponse = await defaultLoadBlazorBootJson(loaderResponse);
23+
} else {
24+
bootConfigResponse = await loaderResponse;
25+
}
2026

2127
// While we can expect an ASP.NET Core hosted application to include the environment, other
2228
// hosts may not. Assume 'Production' in the absence of any specified value.

0 commit comments

Comments
 (0)