From 77a67e29c62165176c8f491bb537a9223788871e Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Mon, 12 Dec 2022 01:50:24 +0000 Subject: [PATCH] Clear kernel ID if disposed --- src/widget.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widget.tsx b/src/widget.tsx index 5d5a9e8..5704e59 100644 --- a/src/widget.tsx +++ b/src/widget.tsx @@ -92,6 +92,9 @@ const KernelUsage = (props: { const path = panel?.sessionContext.session?.model.path; setPath(path); requestUsage(newKernelId).then(usage => setUsage(usage)); + } else { + // Kernel was disposed + setKernelId(newKernelId); } }; };