handle cases when body of for-of statement is expanded after loop conversion (#13677)

This commit is contained in:
Vladimir Matveev
2017-01-25 09:53:34 -08:00
committed by GitHub
parent e679b2ee76
commit abc30b26c7
5 changed files with 60 additions and 1 deletions

View File

@@ -2316,7 +2316,7 @@ namespace ts {
addRange(statements, convertedLoopBodyStatements);
}
else {
const statement = visitNode(node.statement, visitor, isStatement);
const statement = visitNode(node.statement, visitor, isStatement, /*optional*/ false, liftToBlock);
if (isBlock(statement)) {
addRange(statements, statement.statements);
bodyLocation = statement;