Skip to content

Commit 406c43e

Browse files
committed
Lint
1 parent 54f9d97 commit 406c43e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Changelog
22

33
### `@jupyter-lsp/jupyterlab-lsp 5.0.0-rc.1`
4+
45
- restore re-use of unused standalone connections
56

67
### `@jupyter-lsp/jupyterlab-lsp 5.0.0-rc.0`

packages/jupyterlab-lsp/src/virtual/document.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,16 @@ export class VirtualDocument extends VirtualDocumentBase {
220220
foreignDocument = this.foreignDocuments.get(extractor.language)!;
221221
} else {
222222
// if standalone, try to re-use existing connection to the server
223-
let unusedStandalone = this.unusedStandaloneDocuments.get(
224-
extractor.language
225-
);
226-
if (extractor.standalone && unusedStandalone.length > 0) {
227-
foreignDocument = unusedStandalone.pop()!;
228-
this.unusedDocuments.delete(foreignDocument);
229-
} else {
223+
let unusedStandalone = this.unusedStandaloneDocuments.get(
224+
extractor.language
225+
);
226+
if (extractor.standalone && unusedStandalone.length > 0) {
227+
foreignDocument = unusedStandalone.pop()!;
228+
this.unusedDocuments.delete(foreignDocument);
229+
} else {
230230
// if (previous document does not exists) or (extractor produces standalone documents
231231
// and no old standalone document could be reused): create a new document
232+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
232233
// @ts-ignore
233234
foreignDocument = this.openForeign(
234235
extractor.language,

0 commit comments

Comments
 (0)