From 6fdda94d47f3adab9ed004c6f41503405299e3b7 Mon Sep 17 00:00:00 2001 From: Zach Sailer Date: Fri, 3 Jan 2025 09:35:57 -0800 Subject: [PATCH] add logic to remove the 'compare' button --- src/command.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/command.ts b/src/command.ts index bb1ab69..7793fb8 100644 --- a/src/command.ts +++ b/src/command.ts @@ -42,9 +42,11 @@ export function showCellDiff( mergeView.hide(); const footer = cellFooterTracker.getFooter(data.cell_id); - // Try removing any old widget that exists. + + // Try removing any old widget, if it exists. try { footer?.removeWidget('jp-cell-diff'); + footer?.removeToolbarItem('compare'); } finally { // Do Nothing }