We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 948540e commit 585a83dCopy full SHA for 585a83d
src/Core/Components/Menu/FluentMenu.razor.cs
@@ -397,9 +397,16 @@ public async ValueTask DisposeAsync()
397
398
try
399
{
400
- await _jsModule.InvokeVoidAsync("dispose", Anchor);
401
- await _jsModule.DisposeAsync();
402
- await _anchoredRegionModule.DisposeAsync();
+ if(_jsModule is not null)
+ {
+ await _jsModule.InvokeVoidAsync("dispose", Anchor);
403
+ await _jsModule.DisposeAsync();
404
+ }
405
+
406
+ if(_anchoredRegionModule is not null)
407
408
+ await _anchoredRegionModule.DisposeAsync();
409
410
}
411
catch (Exception ex) when (ex is JSDisconnectedException ||
412
ex is OperationCanceledException)
0 commit comments