Skip to content

Commit 1b1a1db

Browse files
committed
use cancel token when creating sql cell status bar button
1 parent fa98ab3 commit 1b1a1db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/notebooks/deepnote/sqlCellStatusBarProvider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ export class SqlCellStatusBarProvider implements NotebookCellStatusBarItemProvid
4444

4545
public provideCellStatusBarItems(
4646
cell: NotebookCell,
47-
_token: CancellationToken
47+
token: CancellationToken
4848
): ProviderResult<NotebookCellStatusBarItem | NotebookCellStatusBarItem[]> {
49+
if (token?.isCancellationRequested) {
50+
return undefined;
51+
}
52+
4953
// Only show status bar for SQL cells
5054
if (cell.document.languageId !== 'sql') {
5155
return undefined;

0 commit comments

Comments
 (0)