Skip to content

Commit 822c684

Browse files
authored
Merge pull request #2 from Zsailer/remove-button
add logic to remove the 'compare' button
2 parents f16670a + 6fdda94 commit 822c684

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/command.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ export function showCellDiff(
4242
mergeView.hide();
4343

4444
const footer = cellFooterTracker.getFooter(data.cell_id);
45-
// Try removing any old widget that exists.
45+
46+
// Try removing any old widget, if it exists.
4647
try {
4748
footer?.removeWidget('jp-cell-diff');
49+
footer?.removeToolbarItem('compare');
4850
} finally {
4951
// Do Nothing
5052
}

0 commit comments

Comments
 (0)