Merge pull request #21897 from Microsoft/fix21626

Fix duplicate label in es2017 async function
This commit is contained in:
Ron Buckton
2018-02-12 13:04:39 -08:00
committed by GitHub
13 changed files with 150 additions and 9 deletions

View File

@@ -153,7 +153,7 @@ namespace ts {
if (statement.kind === SyntaxKind.ForOfStatement && (<ForOfStatement>statement).awaitModifier) {
return visitForOfStatement(<ForOfStatement>statement, node);
}
return restoreEnclosingLabel(visitEachChild(node, visitor, context), node);
return restoreEnclosingLabel(visitEachChild(statement, visitor, context), node);
}
return visitEachChild(node, visitor, context);
}