This repository was archived by the owner on Dec 26, 2025. It is now read-only.
Fixed ObjectDisposedException in Blazor Web App (InteractiveWebAssembly to StreamRendering mode)#595
Open
theumairtahir wants to merge 3 commits intoBlazored:mainfrom
Open
Fixed ObjectDisposedException in Blazor Web App (InteractiveWebAssembly to StreamRendering mode)#595theumairtahir wants to merge 3 commits intoBlazored:mainfrom
theumairtahir wants to merge 3 commits intoBlazored:mainfrom
Conversation
added 3 commits
January 27, 2025 10:49
…ly to StreamRendering mode) Added a try-catch block around the InvokeVoidAsync method call to handle potential ObjectDisposedException exceptions. This ensures graceful handling of scenarios where the JavaScript runtime might not be available, such as in a hybrid Blazor Web App environment. The catch block includes a comment explaining that no action is needed if this exception occurs.
Moved the try-catch block inside the if statement checking for non-null _styleFunctions. This ensures the try block is only executed when _styleFunctions is available and handles ObjectDisposedException in the same context, improving code structure and readability.
This commit updates the project's target framework from .NET 8.0 to .NET 9.0, ensuring compatibility with the latest features and improvements.
|
Hello, this also fixes #602. @chrissainty, any chance to get it merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a
try-catchblock around theInvokeVoidAsyncmethod call tohandle potential
ObjectDisposedExceptionexceptions. This ensuresgraceful handling of scenarios where the JavaScript runtime might
not be available, such as in a hybrid Blazor Web App environment.
The catch block includes a comment explaining that no action is
needed if this exception occurs.
Fix of issue #594