Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/Components/Web.JS/src/Platform/BootConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ export class BootConfigResult {
loadBootResource('manifest', 'blazor.boot.json', '_framework/blazor.boot.json', '') :
defaultLoadBlazorBootJson('_framework/blazor.boot.json');

const bootConfigResponse = loaderResponse instanceof Promise ?
await loaderResponse :
await defaultLoadBlazorBootJson(loaderResponse ?? '_framework/blazor.boot.json');
let bootConfigResponse: Response;

if (!loaderResponse) {
bootConfigResponse = await defaultLoadBlazorBootJson('_framework/blazor.boot.json');
} else if (typeof loaderResponse === 'string') {
bootConfigResponse = await defaultLoadBlazorBootJson(loaderResponse);
} else {
bootConfigResponse = await loaderResponse;
}

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