Skip to content

Conversation

@MackinnonBuck
Copy link
Member

Fix Blazor boot config loading

There was an instanceof Promise check in BootConfig.ts that failed when the default Promise type got overridden (as it does in libraries like zone.js). This PR fixes the issue by rearranging the logic to avoid performing this check.

The filed issue used Blazor components in an Angular app, where Blazor was manually started using Blazor.start() rather than letting the script auto-start. I've reproduced original bug and verified the fix locally.

Fixes #40245

@MackinnonBuck MackinnonBuck requested a review from a team as a code owner June 1, 2022 16:57
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jun 1, 2022
Copy link
Contributor

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning on backporting this to 6.0?

@MackinnonBuck
Copy link
Member Author

Are we planning on backporting this to 6.0?

Yep, I'll create a backport PR after this is merged.

@MackinnonBuck MackinnonBuck merged commit 5fed812 into main Jun 1, 2022
@MackinnonBuck MackinnonBuck deleted the mbuck/fix-blazor-boot-config branch June 1, 2022 21:33
@ghost ghost added this to the 7.0-preview6 milestone Jun 1, 2022
MackinnonBuck added a commit that referenced this pull request Jun 1, 2022
wtgodbe pushed a commit that referenced this pull request Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot load blazor in an angular app

3 participants