mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Add missing disposable registration (#198473)
This commit is contained in:
parent
4f1065bf12
commit
4f866533b4
|
@ -31,16 +31,17 @@ const getFreshLensLocation = () => workspace.getConfiguration().get(Constants.Co
|
|||
*/
|
||||
export class NpmScriptLensProvider implements CodeLensProvider, Disposable {
|
||||
private lensLocation = getFreshLensLocation();
|
||||
private changeEmitter = new EventEmitter<void>();
|
||||
private readonly changeEmitter = new EventEmitter<void>();
|
||||
private subscriptions: Disposable[] = [];
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public onDidChangeCodeLenses = this.changeEmitter.event;
|
||||
public readonly onDidChangeCodeLenses = this.changeEmitter.event;
|
||||
|
||||
constructor() {
|
||||
this.subscriptions.push(
|
||||
this.changeEmitter,
|
||||
workspace.onDidChangeConfiguration(evt => {
|
||||
if (evt.affectsConfiguration(Constants.ConfigKey)) {
|
||||
this.lensLocation = getFreshLensLocation();
|
||||
|
|
Loading…
Reference in a new issue