mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
capture 'this' to use retrieveVariable as callback (#12828)
* capture 'this' to use retrieveVariable as callback * remove change not needed for #12082
This commit is contained in:
@@ -41,7 +41,9 @@ export class ArcControllersOptionsSourceProvider implements rd.IOptionsSourcePro
|
|||||||
}
|
}
|
||||||
|
|
||||||
getVariableValue(variableName: string, controllerLabel: string): Promise<string> {
|
getVariableValue(variableName: string, controllerLabel: string): Promise<string> {
|
||||||
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<string> {
|
private async getPassword(controller: arc.DataController): Promise<string> {
|
||||||
|
|||||||
Reference in New Issue
Block a user