diff --git a/extensions/arc/src/providers/arcControllersOptionsSourceProvider.ts b/extensions/arc/src/providers/arcControllersOptionsSourceProvider.ts index ac1089c09d..2623ab60fa 100644 --- a/extensions/arc/src/providers/arcControllersOptionsSourceProvider.ts +++ b/extensions/arc/src/providers/arcControllersOptionsSourceProvider.ts @@ -41,7 +41,9 @@ export class ArcControllersOptionsSourceProvider implements rd.IOptionsSourcePro } getVariableValue(variableName: string, controllerLabel: string): Promise { - return this._cacheManager.getCacheEntry(JSON.stringify([variableName, controllerLabel]), this.retrieveVariable); + // capture 'this' in an arrow function object + const retrieveVariable = (key: string) => this.retrieveVariable(key); + return this._cacheManager.getCacheEntry(JSON.stringify([variableName, controllerLabel]), retrieveVariable); } private async getPassword(controller: arc.DataController): Promise {