Skip to content

Commit 7167439

Browse files
author
Mikhail Arkhipov
authored
Bind function to class instance in middleware (#9109)
* Bind function to class * Add news
1 parent 7cf7ec4 commit 7167439

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

news/2 Fixes/9096.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix issue that prevented language server diagnostics from being published.

src/client/activation/languageServer/languageClientMiddleware.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class LanguageClientMiddleware implements Middleware {
5858
private connected = false; // Default to not forwarding to VS code.
5959

6060
public constructor(private readonly surveyBanner: IPythonExtensionBanner) {
61+
this.handleDiagnostics = this.handleDiagnostics.bind(this); // VS Code calls function without context.
6162
}
6263

6364
public connect() {

0 commit comments

Comments
 (0)