File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
packages/jupyterlab-lsp/src/features/completion Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ export class EnhancedKernelCompleterProvider extends KernelCompleterProvider {
9393
9494 const manager = this . options . connectionManager ;
9595 const widget = context . widget as IDocumentWidget ;
96+ if ( typeof widget . context === 'undefined' ) {
97+ // there is no path for Console as it is not a DocumentWidget
98+ return upstream ;
99+ }
96100 const adapter = manager . adapters . get ( widget . context . path ) ;
97101
98102 if ( ! adapter ) {
Original file line number Diff line number Diff line change @@ -301,6 +301,10 @@ export class CompletionProvider implements ICompletionProvider<CompletionItem> {
301301 }
302302 const manager = this . options . connectionManager ;
303303 const widget = context . widget as IDocumentWidget ;
304+ if ( typeof widget . context === 'undefined' ) {
305+ // there is no path for Console as it is not a DocumentWidget
306+ return false ;
307+ }
304308 const adapter = manager . adapters . get ( widget . context . path ) ;
305309 if ( ! adapter ) {
306310 return false ;
You can’t perform that action at this time.
0 commit comments