mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Fix missing visit of expression in for..of
This commit is contained in:
@@ -1765,7 +1765,7 @@ namespace ts {
|
||||
// Note also that because an extra statement is needed to assign to the LHS,
|
||||
// for-of bodies are always emitted as blocks.
|
||||
|
||||
const expression = node.expression;
|
||||
const expression = visitNode(node.expression, visitor, isExpression);
|
||||
const initializer = node.initializer;
|
||||
const statements: Statement[] = [];
|
||||
|
||||
@@ -2014,7 +2014,7 @@ namespace ts {
|
||||
case SyntaxKind.ForOfStatement:
|
||||
const initializer = (<ForStatement | ForInStatement | ForOfStatement>node).initializer;
|
||||
if (initializer && initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
loopInitializer = <VariableDeclarationList>(<ForStatement | ForInStatement | ForOfStatement>node).initializer;
|
||||
loopInitializer = <VariableDeclarationList>initializer;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user