diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index e3ee1dd4c3a..7fb0594a6cc 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -2308,8 +2308,7 @@ namespace ts { extraVariableDeclarations = []; } // hoist collected variable declarations - for (const name in currentState.hoistedLocalVariables) { - const identifier = currentState.hoistedLocalVariables[name]; + for (const identifier of currentState.hoistedLocalVariables) { extraVariableDeclarations.push(createVariableDeclaration(identifier)); } }