Skip to content

Commit 08ee4f8

Browse files
committed
Hotfix: guards for _has_kernel()
Tests will come later
1 parent bf6589b commit 08ee4f8

File tree

1 file changed

+2
-2
lines changed
  • packages/jupyterlab-lsp/src/adapters/jupyterlab/components

1 file changed

+2
-2
lines changed

packages/jupyterlab-lsp/src/adapters/jupyterlab/components/completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class LSPConnector extends DataConnector<
6868
}
6969

7070
protected get _has_kernel(): boolean {
71-
return this.options.session.kernel !== null;
71+
return this.options.session && this.options.session.kernel !== null;
7272
}
7373

7474
protected get _kernel_language(): string {
@@ -131,8 +131,8 @@ export class LSPConnector extends DataConnector<
131131

132132
try {
133133
if (
134-
this._has_kernel &&
135134
this._kernel_connector &&
135+
this._has_kernel &&
136136
// TODO: this would be awesome if we could connect to rpy2 for R suggestions in Python,
137137
// but this is not the job of this extension; nevertheless its better to keep this in
138138
// mind to avoid introducing design decisions which would make this impossible

0 commit comments

Comments
 (0)