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); } }; };