- 
                Notifications
    You must be signed in to change notification settings 
- Fork 456
Labels
Description
🐛 Bug Report
I see this error when hot reloading:
fail: Aspire.Hosting.Dashboard.Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'rBZiMW0JBoyiB3tlk6cZbCzTCjG4stihwH9QbT2x3k4'.
      System.ArgumentNullException: Value cannot be null. (Parameter 'jsObjectReference')
         at System.ArgumentNullException.Throw(String paramName)
         at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
         at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
         at Microsoft.FluentUI.AspNetCore.Components.FluentMenu.DisposeAsync()
🤔 Expected Behavior
No error
😯 Current Behavior
Error
💁 Possible Solution
Check whether these module references are null before using them:
fluentui-blazor/src/Core/Components/Menu/FluentMenu.razor.cs
Lines 400 to 402 in 948540e
| await _jsModule.InvokeVoidAsync("dispose", Anchor); | |
| await _jsModule.DisposeAsync(); | |
| await _anchoredRegionModule.DisposeAsync(); | 
IMO the fields should be nullable so nullable checks catch this. Almost everywhere they're used in this type they're checked for null before use.
🔦 Context
🌍 Your Environment
- OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
- Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
- .NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]
aco-mreble