fix: catch JSDisconnectedException and ObjectDisposedException in MarkdownEditor DisposeAsync to prevent noisy circuit disconnect logs

This commit is contained in:
2026-06-08 14:16:59 +02:00
parent 5d67bbf88b
commit 30adb3c33f
@@ -116,10 +116,18 @@
await _module.DisposeAsync();
}
}
catch (JSDisconnectedException)
{
// Fail silently during circuit disconnection
}
catch (ObjectDisposedException)
{
// Fail silently if JS runtime/module is already disposed
}
catch (Exception ex)
{
// Fail silently during page navigation/webview closures to avoid noisy logs
Console.WriteLine($"[MarkdownEditor] Error during JS cleanup: {ex.Message}");
// Log other unexpected errors
Console.WriteLine($"[MarkdownEditor] Unexpected error during JS cleanup: {ex.Message}");
}
finally
{