diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 45b2ba0ee2..9edecce89e 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -69,9 +69,7 @@ namespace ts { } currentSourceFile = sourceFile; - const visited = transformation(sourceFile); - currentSourceFile = undefined; - return visited; + return transformation(sourceFile); } function enableExpressionSubstitution(kind: SyntaxKind) {