Skip to content

MudThemeProvider: Wrap JS in a try-catch#9042

Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:theme_js_error
May 23, 2024
Merged

MudThemeProvider: Wrap JS in a try-catch#9042
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:theme_js_error

Conversation

@ScarletKuro
Copy link
Member

@ScarletKuro ScarletKuro commented May 23, 2024

Description

Fixes: #8991

It's questionable whether it fixes it completely, since the DOM is modified and Blazor doesn't like this. However, we wrap most of our JS calls in InvokeAsyncWithErrorHandling, and as I mentioned in the comment, there is nothing else we can do.

Feel free to ask if you need further assistance!

How Has This Been Tested?

None

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels May 23, 2024
@ScarletKuro ScarletKuro changed the title MudThemeProvider: Wrap JS in try-catch MudThemeProvider: Wrap JS in a try-catch May 23, 2024
@ScarletKuro ScarletKuro merged commit d3bee4c into MudBlazor:dev May 23, 2024
@ScarletKuro ScarletKuro deleted the theme_js_error branch May 23, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark Reader plugin and MudThemeProvider.GetSystemPreference() cause error

1 participant