Skip to content

Commit 4f86653

Browse files
authored
Add missing disposable registration (#198473)
1 parent 4f1065b commit 4f86653

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/npm/src/npmScriptLens.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ const getFreshLensLocation = () => workspace.getConfiguration().get(Constants.Co
3131
*/
3232
export class NpmScriptLensProvider implements CodeLensProvider, Disposable {
3333
private lensLocation = getFreshLensLocation();
34-
private changeEmitter = new EventEmitter<void>();
34+
private readonly changeEmitter = new EventEmitter<void>();
3535
private subscriptions: Disposable[] = [];
3636

3737
/**
3838
* @inheritdoc
3939
*/
40-
public onDidChangeCodeLenses = this.changeEmitter.event;
40+
public readonly onDidChangeCodeLenses = this.changeEmitter.event;
4141

4242
constructor() {
4343
this.subscriptions.push(
44+
this.changeEmitter,
4445
workspace.onDidChangeConfiguration(evt => {
4546
if (evt.affectsConfiguration(Constants.ConfigKey)) {
4647
this.lensLocation = getFreshLensLocation();

0 commit comments

Comments
 (0)