Closed alinapereira closed 2 days ago
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.
Is there an existing issue for this?
Describe the bug
The function below should have a validation for when the parentNode is null before attempting to remove its child node:
In the print below you can check that the parent instance is null, leading to this type of exception: blazor.webassembly.js?v=7.0:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Cannot read properties of null (reading 'removeChild') TypeError: Cannot read properties of null (reading 'removeChild') at $ (https://.../_framework/blazor.webassembly.js?v=7.0:1:17340)
Expected Behavior
By adding the validation when the parentNode is not null the child node will still be removed, when the parent element is null then no error will be shown in the console.
Steps To Reproduce
This error is showing on the browser console since we updated the .NET version from 6 to 7.
Exceptions (if any)
No response
.NET Version
7 and above
Anything else?
No response