File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,22 @@ export class SqlCellStatusBarProvider implements NotebookCellStatusBarItemProvid
5050
5151 // Register command to update SQL variable name
5252 this . disposables . push (
53- commands . registerCommand ( 'deepnote.updateSqlVariableName' , async ( cell : NotebookCell ) => {
53+ commands . registerCommand ( 'deepnote.updateSqlVariableName' , async ( cell ?: NotebookCell ) => {
54+ if ( ! cell ) {
55+ void window . showErrorMessage ( l10n . t ( 'No active notebook cell' ) ) ;
56+ return ;
57+ }
5458 await this . updateVariableName ( cell ) ;
5559 } )
5660 ) ;
5761
5862 // Register command to switch SQL integration
5963 this . disposables . push (
60- commands . registerCommand ( 'deepnote.switchSqlIntegration' , async ( cell : NotebookCell ) => {
64+ commands . registerCommand ( 'deepnote.switchSqlIntegration' , async ( cell ?: NotebookCell ) => {
65+ if ( ! cell ) {
66+ void window . showErrorMessage ( l10n . t ( 'No active notebook cell' ) ) ;
67+ return ;
68+ }
6169 await this . switchIntegration ( cell ) ;
6270 } )
6371 ) ;
You can’t perform that action at this time.
0 commit comments