Skip to content

Commit 8279cc7

Browse files
committed
Respect thisArg in EnvironmentVariableCollection.forEach
Fixes microsoft#94077
1 parent 74ea30b commit 8279cc7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/workbench/api/common/extHostTerminalService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ export class EnvironmentVariableCollection implements vscode.EnvironmentVariable
692692

693693
forEach(callback: (variable: string, mutator: vscode.EnvironmentVariableMutator, collection: vscode.EnvironmentVariableCollection) => any, thisArg?: any): void {
694694
this._checkDisposed();
695-
this.map.forEach((value, key) => callback(key, value, this));
695+
this.map.forEach((value, key) => callback.call(thisArg, key, value, this));
696696
}
697697

698698
delete(variable: string): void {

0 commit comments

Comments
 (0)