Skip to content
代码片段 群组 项目
未验证 提交 cf5bfa19 编辑于 作者: Mackinnon Buck's avatar Mackinnon Buck 提交者: GitHub
浏览文件

Catch JSDisconnectedException during disposal (#44800) (#44806)

上级 f490fe4b
No related branches found
No related tags found
无相关合并请求
......@@ -107,7 +107,14 @@ public sealed class NavigationLock : IComponent, IHandleAfterRender, IAsyncDispo
if (_confirmExternalNavigation)
{
await JSRuntime.InvokeVoidAsync(NavigationLockInterop.DisableNavigationPrompt, _id);
try
{
await JSRuntime.InvokeVoidAsync(NavigationLockInterop.DisableNavigationPrompt, _id);
}
catch (JSDisconnectedException)
{
// If the browser is gone, we don't need it to clean up any browser-side state
}
}
}
}
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册