Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/Core/Components/Menu/FluentMenu.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,16 @@ public async ValueTask DisposeAsync()

try
{
await _jsModule.InvokeVoidAsync("dispose", Anchor);
await _jsModule.DisposeAsync();
await _anchoredRegionModule.DisposeAsync();
if(_jsModule is not null)
{
await _jsModule.InvokeVoidAsync("dispose", Anchor);
await _jsModule.DisposeAsync();
}

if(_anchoredRegionModule is not null)
{
await _anchoredRegionModule.DisposeAsync();
}
}
catch (Exception ex) when (ex is JSDisconnectedException ||
ex is OperationCanceledException)
Expand Down
Loading