diff --git a/extensions/npm/src/npmScriptLens.ts b/extensions/npm/src/npmScriptLens.ts index 2f2b9342b027d..c8e506904f882 100644 --- a/extensions/npm/src/npmScriptLens.ts +++ b/extensions/npm/src/npmScriptLens.ts @@ -31,16 +31,17 @@ const getFreshLensLocation = () => workspace.getConfiguration().get(Constants.Co */ export class NpmScriptLensProvider implements CodeLensProvider, Disposable { private lensLocation = getFreshLensLocation(); - private changeEmitter = new EventEmitter(); + private readonly changeEmitter = new EventEmitter(); 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();